mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 06:46:19 +08:00
Add SoftLayer DNS provider (#59)
Add SoftLayer DNS as a DomainServiceProvider. The SoftLayer API is a bit of a mess and treats MX and SRV records differently. This leads to some replication and custom handling issues to work around. In this patch I have to change the SRV test case to be _tcp instead of _protocol because softlayer requires a "known" protocol which AFAICT is tcp, udp or tls. I think this will be acceptable in most cases. Signed-off-by: Jamie Lennox <jamielennox@gmail.com>
This commit is contained in:
parent
e7535fe3cb
commit
7daa7a6467
|
@ -23,6 +23,7 @@ Currently supported DNS providers:
|
|||
- Namecheap
|
||||
- Name.com
|
||||
- Route 53
|
||||
- SoftLayer
|
||||
|
||||
At Stack Overflow, we use this system to manage hundreds of domains
|
||||
and subdomains across multiple registrars and DNS providers.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<th class="rotate"><div><span>NAMEDOTCOM</span></div></th>
|
||||
<th class="rotate"><div><span>NS1</span></div></th>
|
||||
<th class="rotate"><div><span>ROUTE53</span></div></th>
|
||||
<th class="rotate"><div><span>SOFTLAYER</span></div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -55,6 +56,7 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="The provider has registrar capabilities to set nameservers for zones">Registrar</th>
|
||||
|
@ -91,6 +93,9 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="danger">
|
||||
<i class="fa fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Can manage and serve DNS zones">DNS Provider</th>
|
||||
|
@ -127,6 +132,9 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Provider supports some kind of ALIAS, ANAME or flattened CNAME record type">ALIAS</th>
|
||||
|
@ -149,6 +157,7 @@
|
|||
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="R53 does not provide a generic ALIAS functionality. They do have 'ALIAS' CNAME types to point at various AWS infrastructure, but dnscontrol has not implemented those.">
|
||||
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Driver has explicitly implemented SRV record management">SRV</th>
|
||||
|
@ -179,6 +188,9 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Provider supports adding PTR records for reverse lookup zones">PTR</th>
|
||||
|
@ -207,6 +219,7 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Provider can manage CAA records">CAA</th>
|
||||
|
@ -229,6 +242,7 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="Provider can manage TLSA records">TLSA</th>
|
||||
|
@ -245,6 +259,7 @@
|
|||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="This provider is recommended for use in 'dual hosting' scenarios. Usually this means the provider allows full control over the apex NS records">dual host</th>
|
||||
|
@ -275,6 +290,7 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="This means the provider can automatically create domains that do not currently exist on your account. The 'dnscontrol create-domains' command will initialize any missing domains">create-domains</th>
|
||||
|
@ -311,6 +327,7 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="indicates you can use NO_PURGE macro to prevent deleting records not managed by dnscontrol. A few providers that generate the entire zone from scratch have a problem implementing this.">no_purge</th>
|
||||
|
@ -347,6 +364,9 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
50
docs/_providers/softlayer.md
Normal file
50
docs/_providers/softlayer.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
name: "SoftLayer DNS"
|
||||
layout: default
|
||||
jsId: SOFTLAYER
|
||||
---
|
||||
|
||||
# SoftLayer DNS Provider
|
||||
|
||||
## Configuration
|
||||
|
||||
To authenticate with softlayer requires at least a `username` and `api_key` for authentication.
|
||||
It can also optionally take a `timeout` and `endpoint_url` parameter however these are optional and will use standard defaults if not provided.
|
||||
These can be supplied via the standard 'creds.json' like so:
|
||||
{% highlight json %}
|
||||
"softlayer": {
|
||||
"username": "myusername",
|
||||
"api_key": "mysecretapikey"
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
To maintain compatibility with existing softlayer CLI services these can also be provided by the `SL_USERNAME` and `SL_API_KEY` environment variables or specified in the ~/.softlayer.
|
||||
More information about these methods can be found at [the softlayer-go library documentation](https://github.com/softlayer/softlayer-go#sessions).
|
||||
|
||||
## Usage
|
||||
|
||||
Use this provider like any other DNS Provider:
|
||||
|
||||
{% highlight js %}
|
||||
var registrar = NewRegistrar("none","NONE"); // no registrar
|
||||
var softlayer = NewDnsProvider("softlayer", "SOFTLAYER");
|
||||
|
||||
D("example.tld", registrary, DnsProvider(softlayer),
|
||||
A("test","1.2.3.4")
|
||||
);
|
||||
{%endhighlight%}
|
||||
|
||||
## Metadata
|
||||
|
||||
This provider does not recognize any special metadata fields unique to SoftLayer dns.
|
||||
For compatibility with the pre-generated NAMESERVER fields it's recommended to set the NS TTL to 86400 such as:
|
||||
|
||||
{% highlight js %}
|
||||
D("example.tld", registrary, DnsProvider(softlayer),
|
||||
{"ns_ttl": "86400"},
|
||||
|
||||
A("test","1.2.3.4")
|
||||
);
|
||||
{%endhighlight%}
|
||||
|
||||
`ns_ttl` is a standard metadata field that applies to all providers.
|
|
@ -131,7 +131,7 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
|
|||
t.Log(c.Msg)
|
||||
}
|
||||
err = c.F()
|
||||
if err != nil {
|
||||
if !skipVal && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,5 +49,12 @@
|
|||
"KeyId": "$R53_KEY_ID",
|
||||
"SecretKey": "$R53_KEY",
|
||||
"domain": "$R53_DOMAIN"
|
||||
},
|
||||
"SOFTLAYER": {
|
||||
"COMMENT": "22-25 softlayer fails at direct internationalization, puncode works though",
|
||||
"knownFailures": "22,23,24,25",
|
||||
"domain": "$SL_DOMAIN",
|
||||
"username": "$SL_USERNAME",
|
||||
"api_key": "$SL_API_KEY"
|
||||
}
|
||||
}
|
|
@ -14,4 +14,5 @@ import (
|
|||
_ "github.com/StackExchange/dnscontrol/providers/namedotcom"
|
||||
_ "github.com/StackExchange/dnscontrol/providers/ns1"
|
||||
_ "github.com/StackExchange/dnscontrol/providers/route53"
|
||||
_ "github.com/StackExchange/dnscontrol/providers/softlayer"
|
||||
)
|
||||
|
|
349
providers/softlayer/softlayer.go
Normal file
349
providers/softlayer/softlayer.go
Normal file
|
@ -0,0 +1,349 @@
|
|||
package softlayer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/models"
|
||||
"github.com/StackExchange/dnscontrol/providers"
|
||||
"github.com/StackExchange/dnscontrol/providers/diff"
|
||||
"github.com/miekg/dns/dnsutil"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/filter"
|
||||
"github.com/softlayer/softlayer-go/services"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
)
|
||||
|
||||
type SoftLayer struct {
|
||||
Session *session.Session
|
||||
}
|
||||
|
||||
func init() {
|
||||
providers.RegisterDomainServiceProviderType("SOFTLAYER", newReg, providers.CanUseSRV)
|
||||
}
|
||||
|
||||
func newReg(conf map[string]string, _ json.RawMessage) (providers.DNSServiceProvider, error) {
|
||||
s := session.New(conf["username"], conf["api_key"], conf["endpoint_url"], conf["timeout"])
|
||||
|
||||
if len(s.UserName) == 0 || len(s.APIKey) == 0 {
|
||||
return nil, fmt.Errorf("SoftLayer UserName and APIKey must be provided")
|
||||
}
|
||||
|
||||
//s.Debug = true
|
||||
|
||||
api := &SoftLayer{
|
||||
Session: s,
|
||||
}
|
||||
|
||||
return api, nil
|
||||
}
|
||||
|
||||
func (s *SoftLayer) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
||||
// Always use the same nameservers for softlayer
|
||||
nservers := []string{"ns1.softlayer.com", "ns2.softlayer.com"}
|
||||
return models.StringsToNameservers(nservers), nil
|
||||
}
|
||||
|
||||
func (s *SoftLayer) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
corrections := []*models.Correction{}
|
||||
|
||||
domain, err := s.getDomain(&dc.Name)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
actual, err := s.getExistingRecords(domain)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, create, delete, modify := diff.New(dc).IncrementalDiff(actual)
|
||||
|
||||
for _, del := range delete {
|
||||
existing := del.Existing.Original.(datatypes.Dns_Domain_ResourceRecord)
|
||||
corrections = append(corrections, &models.Correction{
|
||||
Msg: del.String(),
|
||||
F: s.deleteRecordFunc(*existing.Id),
|
||||
})
|
||||
}
|
||||
|
||||
for _, cre := range create {
|
||||
corrections = append(corrections, &models.Correction{
|
||||
Msg: cre.String(),
|
||||
F: s.createRecordFunc(cre.Desired, domain),
|
||||
})
|
||||
}
|
||||
|
||||
for _, mod := range modify {
|
||||
existing := mod.Existing.Original.(datatypes.Dns_Domain_ResourceRecord)
|
||||
corrections = append(corrections, &models.Correction{
|
||||
Msg: mod.String(),
|
||||
F: s.updateRecordFunc(&existing, mod.Desired),
|
||||
})
|
||||
}
|
||||
|
||||
return corrections, nil
|
||||
}
|
||||
|
||||
func (s *SoftLayer) getDomain(name *string) (*datatypes.Dns_Domain, error) {
|
||||
domains, err := services.GetAccountService(s.Session).
|
||||
Filter(filter.Path("domains.name").Eq(name).Build()).
|
||||
Mask("resourceRecords").
|
||||
GetDomains()
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(domains) == 0 {
|
||||
return nil, fmt.Errorf("Didn't find a domain matching %s", *name)
|
||||
} else if len(domains) > 1 {
|
||||
return nil, fmt.Errorf("Found %d domains matching %s", len(domains), *name)
|
||||
}
|
||||
|
||||
return &domains[0], nil
|
||||
}
|
||||
|
||||
func (s *SoftLayer) getExistingRecords(domain *datatypes.Dns_Domain) ([]*models.RecordConfig, error) {
|
||||
actual := []*models.RecordConfig{}
|
||||
|
||||
for _, record := range domain.ResourceRecords {
|
||||
recType := strings.ToUpper(*record.Type)
|
||||
|
||||
if recType == "SOA" {
|
||||
continue
|
||||
}
|
||||
|
||||
recConfig := &models.RecordConfig{
|
||||
Type: recType,
|
||||
Target: *record.Data,
|
||||
TTL: uint32(*record.Ttl),
|
||||
Original: record,
|
||||
}
|
||||
|
||||
switch recType {
|
||||
case "SRV":
|
||||
var service, protocol string = "", "_tcp"
|
||||
|
||||
if record.Weight != nil {
|
||||
recConfig.SrvWeight = uint16(*record.Weight)
|
||||
}
|
||||
if record.Port != nil {
|
||||
recConfig.SrvPort = uint16(*record.Port)
|
||||
}
|
||||
if record.Priority != nil {
|
||||
recConfig.SrvPriority = uint16(*record.Priority)
|
||||
}
|
||||
if record.Protocol != nil {
|
||||
protocol = *record.Protocol
|
||||
}
|
||||
if record.Service != nil {
|
||||
service = *record.Service
|
||||
}
|
||||
|
||||
recConfig.Name = fmt.Sprintf("%s.%s", service, strings.ToLower(protocol))
|
||||
|
||||
case "MX":
|
||||
if record.MxPriority != nil {
|
||||
recConfig.MxPreference = uint16(*record.MxPriority)
|
||||
}
|
||||
|
||||
fallthrough
|
||||
|
||||
default:
|
||||
recConfig.Name = *record.Host
|
||||
}
|
||||
|
||||
recConfig.NameFQDN = dnsutil.AddOrigin(recConfig.Name, *domain.Name)
|
||||
actual = append(actual, recConfig)
|
||||
}
|
||||
|
||||
return actual, nil
|
||||
}
|
||||
|
||||
func (s *SoftLayer) createRecordFunc(desired *models.RecordConfig, domain *datatypes.Dns_Domain) func() error {
|
||||
var ttl, preference, domainId int = int(desired.TTL), int(desired.MxPreference), *domain.Id
|
||||
var weight, priority, port int = int(desired.SrvWeight), int(desired.SrvPriority), int(desired.SrvPort)
|
||||
var host, data, newType string = desired.Name, desired.Target, desired.Type
|
||||
var err error = nil
|
||||
|
||||
srvRegexp := regexp.MustCompile(`^_(?P<Service>\w+)\.\_(?P<Protocol>\w+)$`)
|
||||
|
||||
return func() error {
|
||||
newRecord := datatypes.Dns_Domain_ResourceRecord{
|
||||
DomainId: &domainId,
|
||||
Ttl: &ttl,
|
||||
Type: &newType,
|
||||
Data: &data,
|
||||
Host: &host,
|
||||
}
|
||||
|
||||
switch newType {
|
||||
case "MX":
|
||||
service := services.GetDnsDomainResourceRecordMxTypeService(s.Session)
|
||||
|
||||
newRecord.MxPriority = &preference
|
||||
|
||||
newMx := datatypes.Dns_Domain_ResourceRecord_MxType{
|
||||
Dns_Domain_ResourceRecord: newRecord,
|
||||
}
|
||||
|
||||
_, err = service.CreateObject(&newMx)
|
||||
|
||||
case "SRV":
|
||||
service := services.GetDnsDomainResourceRecordSrvTypeService(s.Session)
|
||||
result := srvRegexp.FindStringSubmatch(host)
|
||||
|
||||
if len(result) != 3 {
|
||||
return fmt.Errorf("SRV Record must match format \"_service._protocol\" not %s", host)
|
||||
}
|
||||
|
||||
var serviceName, protocol string = result[1], strings.ToLower(result[2])
|
||||
|
||||
newSrv := datatypes.Dns_Domain_ResourceRecord_SrvType{
|
||||
Dns_Domain_ResourceRecord: newRecord,
|
||||
Service: &serviceName,
|
||||
Port: &port,
|
||||
Priority: &priority,
|
||||
Protocol: &protocol,
|
||||
Weight: &weight,
|
||||
}
|
||||
|
||||
_, err = service.CreateObject(&newSrv)
|
||||
|
||||
default:
|
||||
service := services.GetDnsDomainResourceRecordService(s.Session)
|
||||
_, err = service.CreateObject(&newRecord)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SoftLayer) deleteRecordFunc(resId int) func() error {
|
||||
// seems to be no problem deleting MX and SRV records via common interface
|
||||
return func() error {
|
||||
_, err := services.GetDnsDomainResourceRecordService(s.Session).
|
||||
Id(resId).
|
||||
DeleteObject()
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SoftLayer) updateRecordFunc(existing *datatypes.Dns_Domain_ResourceRecord, desired *models.RecordConfig) func() error {
|
||||
var ttl, preference int = int(desired.TTL), int(desired.MxPreference)
|
||||
var priority, weight, port int = int(desired.SrvPriority), int(desired.SrvWeight), int(desired.SrvPort)
|
||||
|
||||
return func() error {
|
||||
var changes bool = false
|
||||
var err error = nil
|
||||
|
||||
switch desired.Type {
|
||||
case "MX":
|
||||
service := services.GetDnsDomainResourceRecordMxTypeService(s.Session)
|
||||
updated := datatypes.Dns_Domain_ResourceRecord_MxType{}
|
||||
|
||||
if desired.Name != *existing.Host {
|
||||
updated.Host = &desired.Name
|
||||
changes = true
|
||||
}
|
||||
|
||||
if desired.Target != *existing.Data {
|
||||
updated.Data = &desired.Target
|
||||
changes = true
|
||||
}
|
||||
|
||||
if ttl != *existing.Ttl {
|
||||
updated.Ttl = &ttl
|
||||
changes = true
|
||||
}
|
||||
|
||||
if preference != *existing.MxPriority {
|
||||
updated.MxPriority = &preference
|
||||
changes = true
|
||||
}
|
||||
|
||||
if !changes {
|
||||
return fmt.Errorf("Error: Didn't find changes when I expect some.")
|
||||
}
|
||||
|
||||
_, err = service.Id(*existing.Id).EditObject(&updated)
|
||||
|
||||
case "SRV":
|
||||
service := services.GetDnsDomainResourceRecordSrvTypeService(s.Session)
|
||||
updated := datatypes.Dns_Domain_ResourceRecord_SrvType{}
|
||||
|
||||
if desired.Name != *existing.Host {
|
||||
updated.Host = &desired.Name
|
||||
changes = true
|
||||
}
|
||||
|
||||
if desired.Target != *existing.Data {
|
||||
updated.Data = &desired.Target
|
||||
changes = true
|
||||
}
|
||||
|
||||
if ttl != *existing.Ttl {
|
||||
updated.Ttl = &ttl
|
||||
changes = true
|
||||
}
|
||||
|
||||
if priority != *existing.Priority {
|
||||
updated.Priority = &priority
|
||||
changes = true
|
||||
}
|
||||
|
||||
if weight != *existing.Weight {
|
||||
updated.Weight = &weight
|
||||
changes = true
|
||||
}
|
||||
|
||||
if port != *existing.Port {
|
||||
updated.Port = &port
|
||||
changes = true
|
||||
}
|
||||
|
||||
// TODO: handle service & protocol - or does that just result in a
|
||||
// delete and recreate?
|
||||
|
||||
if !changes {
|
||||
return fmt.Errorf("Error: Didn't find changes when I expect some.")
|
||||
}
|
||||
|
||||
_, err = service.Id(*existing.Id).EditObject(&updated)
|
||||
|
||||
default:
|
||||
service := services.GetDnsDomainResourceRecordService(s.Session)
|
||||
updated := datatypes.Dns_Domain_ResourceRecord{}
|
||||
|
||||
if desired.Name != *existing.Host {
|
||||
updated.Host = &desired.Name
|
||||
changes = true
|
||||
}
|
||||
|
||||
if desired.Target != *existing.Data {
|
||||
updated.Data = &desired.Target
|
||||
changes = true
|
||||
}
|
||||
|
||||
if ttl != *existing.Ttl {
|
||||
updated.Ttl = &ttl
|
||||
changes = true
|
||||
}
|
||||
|
||||
if !changes {
|
||||
return fmt.Errorf("Error: Didn't find changes when I expect some.")
|
||||
}
|
||||
|
||||
_, err = service.Id(*existing.Id).EditObject(&updated)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
19
vendor/github.com/renier/xmlrpc/LICENSE
generated
vendored
Normal file
19
vendor/github.com/renier/xmlrpc/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (C) 2012 Dmitry Maksimov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
79
vendor/github.com/renier/xmlrpc/README.md
generated
vendored
Normal file
79
vendor/github.com/renier/xmlrpc/README.md
generated
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
## Overview
|
||||
|
||||
xmlrpc is an implementation of client side part of XMLRPC protocol in Go language.
|
||||
|
||||
## Installation
|
||||
|
||||
To install xmlrpc package run `go get github.com/kolo/xmlrpc`. To use
|
||||
it in application add `"github.com/kolo/xmlrpc"` string to `import`
|
||||
statement.
|
||||
|
||||
## Usage
|
||||
|
||||
client, _ := xmlrpc.NewClient("https://bugzilla.mozilla.org/xmlrpc.cgi", nil)
|
||||
result := struct{
|
||||
Version string `xmlrpc:"version"`
|
||||
}{}
|
||||
client.Call("Bugzilla.version", nil, &result)
|
||||
fmt.Printf("Version: %s\n", result.Version) // Version: 4.2.7+
|
||||
|
||||
Second argument of NewClient function is an object that implements
|
||||
[http.RoundTripper](http://golang.org/pkg/net/http/#RoundTripper)
|
||||
interface, it can be used to get more control over connection options.
|
||||
By default it initialized by http.DefaultTransport object.
|
||||
|
||||
### Arguments encoding
|
||||
|
||||
xmlrpc package supports encoding of native Go data types to method
|
||||
arguments.
|
||||
|
||||
Data types encoding rules:
|
||||
* int, int8, int16, int32, int64 encoded to int;
|
||||
* float32, float64 encoded to double;
|
||||
* bool encoded to boolean;
|
||||
* string encoded to string;
|
||||
* time.Time encoded to datetime.iso8601;
|
||||
* xmlrpc.Base64 encoded to base64;
|
||||
* slice decoded to array;
|
||||
|
||||
Structs decoded to struct by following rules:
|
||||
* all public field become struct members;
|
||||
* field name become member name;
|
||||
* if field has xmlrpc tag, its value become member name.
|
||||
|
||||
Server method can accept few arguments, to handle this case there is
|
||||
special approach to handle slice of empty interfaces (`[]interface{}`).
|
||||
Each value of such slice encoded as separate argument.
|
||||
|
||||
### Result decoding
|
||||
|
||||
Result of remote function is decoded to native Go data type.
|
||||
|
||||
Data types decoding rules:
|
||||
* int, i4 decoded to int, int8, int16, int32, int64;
|
||||
* double decoded to float32, float64;
|
||||
* boolean decoded to bool;
|
||||
* string decoded to string;
|
||||
* array decoded to slice;
|
||||
* structs decoded following the rules described in previous section;
|
||||
* datetime.iso8601 decoded as time.Time data type;
|
||||
* base64 decoded to string.
|
||||
|
||||
## Implementation details
|
||||
|
||||
xmlrpc package contains clientCodec type, that implements [rpc.ClientCodec](http://golang.org/pkg/net/rpc/#ClientCodec)
|
||||
interface of [net/rpc](http://golang.org/pkg/net/rpc) package.
|
||||
|
||||
xmlrpc package works over HTTP protocol, but some internal functions
|
||||
and data type were made public to make it easier to create another
|
||||
implementation of xmlrpc that works over another protocol. To encode
|
||||
request body there is EncodeMethodCall function. To decode server
|
||||
response Response data type can be used.
|
||||
|
||||
## Contribution
|
||||
|
||||
Feel free to fork the project, submit pull requests, ask questions.
|
||||
|
||||
## Authors
|
||||
|
||||
Dmitry Maksimov (dmtmax@gmail.com)
|
181
vendor/github.com/renier/xmlrpc/client.go
generated
vendored
Normal file
181
vendor/github.com/renier/xmlrpc/client.go
generated
vendored
Normal file
|
@ -0,0 +1,181 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/cookiejar"
|
||||
"net/rpc"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
*rpc.Client
|
||||
}
|
||||
|
||||
// clientCodec is rpc.ClientCodec interface implementation.
|
||||
type clientCodec struct {
|
||||
// url presents url of xmlrpc service
|
||||
url *url.URL
|
||||
|
||||
// httpClient works with HTTP protocol
|
||||
httpClient *http.Client
|
||||
|
||||
// cookies stores cookies received on last request
|
||||
cookies http.CookieJar
|
||||
|
||||
// responses presents map of active requests. It is required to return request id, that
|
||||
// rpc.Client can mark them as done.
|
||||
responsesMu sync.RWMutex
|
||||
responses map[uint64]*http.Response
|
||||
|
||||
response *Response
|
||||
|
||||
// ready presents channel, that is used to link request and it`s response.
|
||||
ready chan *uint64
|
||||
}
|
||||
|
||||
func (codec *clientCodec) WriteRequest(request *rpc.Request, args interface{}) (err error) {
|
||||
httpRequest, err := NewRequest(codec.url.String(), request.ServiceMethod, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if codec.cookies != nil {
|
||||
for _, cookie := range codec.cookies.Cookies(codec.url) {
|
||||
httpRequest.AddCookie(cookie)
|
||||
}
|
||||
}
|
||||
|
||||
httpResponse, err := codec.httpClient.Do(httpRequest)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if codec.cookies != nil {
|
||||
codec.cookies.SetCookies(codec.url, httpResponse.Cookies())
|
||||
}
|
||||
|
||||
codec.responsesMu.Lock()
|
||||
codec.responses[request.Seq] = httpResponse
|
||||
codec.responsesMu.Unlock()
|
||||
|
||||
codec.ready <- &request.Seq
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (codec *clientCodec) ReadResponseHeader(response *rpc.Response) error {
|
||||
seq, ok := <-codec.ready
|
||||
if !ok {
|
||||
return io.EOF
|
||||
}
|
||||
|
||||
codec.responsesMu.RLock()
|
||||
httpResponse := codec.responses[*seq]
|
||||
codec.responsesMu.RUnlock()
|
||||
|
||||
defer func() {
|
||||
httpResponse.Body.Close()
|
||||
codec.responsesMu.Lock()
|
||||
delete(codec.responses, *seq)
|
||||
codec.responsesMu.Unlock()
|
||||
}()
|
||||
|
||||
contentLength := httpResponse.ContentLength
|
||||
if contentLength == -1 {
|
||||
if ntcoentLengthHeader, ok := httpResponse.Header["Ntcoent-Length"]; ok {
|
||||
ntcoentLength, err := strconv.ParseInt(ntcoentLengthHeader[0], 10, 64)
|
||||
if err == nil {
|
||||
contentLength = ntcoentLength
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var respData []byte
|
||||
var err error
|
||||
if contentLength != -1 {
|
||||
respData = make([]byte, contentLength)
|
||||
_, err = io.ReadFull(httpResponse.Body, respData)
|
||||
} else {
|
||||
respData, err = ioutil.ReadAll(httpResponse.Body)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp := NewResponse(respData, httpResponse.StatusCode)
|
||||
|
||||
if resp.Failed() {
|
||||
err := resp.Err()
|
||||
response.Error = fmt.Sprintf("%v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
codec.response = resp
|
||||
|
||||
response.Seq = *seq
|
||||
|
||||
if httpResponse.StatusCode < 200 || httpResponse.StatusCode >= 300 {
|
||||
return &XmlRpcError{HttpStatusCode: httpResponse.StatusCode}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (codec *clientCodec) ReadResponseBody(v interface{}) (err error) {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err = codec.response.Unmarshal(v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (codec *clientCodec) Close() error {
|
||||
transport := codec.httpClient.Transport.(*http.Transport)
|
||||
transport.CloseIdleConnections()
|
||||
close(codec.ready)
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewClient returns instance of rpc.Client object, that is used to send request to xmlrpc service.
|
||||
func NewClient(requrl string, transport http.RoundTripper, timeout time.Duration) (*Client, error) {
|
||||
if transport == nil {
|
||||
transport = http.DefaultTransport
|
||||
}
|
||||
|
||||
httpClient := &http.Client{
|
||||
Transport: transport,
|
||||
Timeout: timeout,
|
||||
}
|
||||
|
||||
jar, err := cookiejar.New(nil)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
u, err := url.Parse(requrl)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
codec := clientCodec{
|
||||
url: u,
|
||||
httpClient: httpClient,
|
||||
ready: make(chan *uint64),
|
||||
responses: make(map[uint64]*http.Response),
|
||||
cookies: jar,
|
||||
}
|
||||
|
||||
return &Client{rpc.NewClientWithCodec(&codec)}, nil
|
||||
}
|
547
vendor/github.com/renier/xmlrpc/decoder.go
generated
vendored
Normal file
547
vendor/github.com/renier/xmlrpc/decoder.go
generated
vendored
Normal file
|
@ -0,0 +1,547 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/text/encoding/charmap"
|
||||
)
|
||||
|
||||
const (
|
||||
iso8601 = "20060102T15:04:05"
|
||||
iso8601hyphen = "2006-01-02T15:04:05Z"
|
||||
iso8601hyphenTZ = "2006-01-02T15:04:05-07:00"
|
||||
)
|
||||
|
||||
var (
|
||||
// CharsetReader is a function to generate reader which converts a non UTF-8
|
||||
// charset into UTF-8.
|
||||
CharsetReader func(string, io.Reader) (io.Reader, error)
|
||||
|
||||
invalidXmlError = errors.New("invalid xml")
|
||||
|
||||
dateFormats = []string{iso8601, iso8601hyphen, iso8601hyphenTZ}
|
||||
|
||||
topArrayRE = regexp.MustCompile(`^<\?xml version="1.0" encoding=".+"\?>\s*<params>\s*<param>\s*<value>\s*<array>`)
|
||||
)
|
||||
|
||||
type TypeMismatchError string
|
||||
|
||||
func (e TypeMismatchError) Error() string { return string(e) }
|
||||
|
||||
type decoder struct {
|
||||
*xml.Decoder
|
||||
}
|
||||
|
||||
func unmarshal(data []byte, v interface{}) (err error) {
|
||||
dec := &decoder{xml.NewDecoder(bytes.NewBuffer(data))}
|
||||
|
||||
if CharsetReader != nil {
|
||||
dec.CharsetReader = CharsetReader
|
||||
} else {
|
||||
dec.CharsetReader = defaultCharsetReader
|
||||
}
|
||||
|
||||
var tok xml.Token
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if t, ok := tok.(xml.StartElement); ok {
|
||||
if t.Name.Local == "value" {
|
||||
val := reflect.ValueOf(v)
|
||||
if val.Kind() != reflect.Ptr {
|
||||
return errors.New("non-pointer value passed to unmarshal")
|
||||
}
|
||||
|
||||
val = val.Elem()
|
||||
// Some APIs that normally return a collection, omit the []'s when
|
||||
// the API returns a single value.
|
||||
if val.Kind() == reflect.Slice && !topArrayRE.MatchString(string(data)) {
|
||||
val.Set(reflect.MakeSlice(val.Type(), 1, 1))
|
||||
val = val.Index(0)
|
||||
}
|
||||
|
||||
if err = dec.decodeValue(val); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// read until end of document
|
||||
err = dec.Skip()
|
||||
if err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dec *decoder) decodeValue(val reflect.Value) error {
|
||||
var tok xml.Token
|
||||
var err error
|
||||
|
||||
if val.Kind() == reflect.Ptr {
|
||||
if val.IsNil() {
|
||||
val.Set(reflect.New(val.Type().Elem()))
|
||||
}
|
||||
val = val.Elem()
|
||||
}
|
||||
|
||||
var typeName string
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if t, ok := tok.(xml.EndElement); ok {
|
||||
if t.Name.Local == "value" {
|
||||
return nil
|
||||
} else {
|
||||
return invalidXmlError
|
||||
}
|
||||
}
|
||||
|
||||
if t, ok := tok.(xml.StartElement); ok {
|
||||
typeName = t.Name.Local
|
||||
break
|
||||
}
|
||||
|
||||
// Treat value data without type identifier as string
|
||||
if t, ok := tok.(xml.CharData); ok {
|
||||
if value := strings.TrimSpace(string(t)); value != "" {
|
||||
if err = checkType(val, reflect.String); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
val.SetString(value)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch typeName {
|
||||
case "struct":
|
||||
ismap := false
|
||||
pmap := val
|
||||
valType := val.Type()
|
||||
|
||||
if err = checkType(val, reflect.Struct); err != nil {
|
||||
if checkType(val, reflect.Map) == nil {
|
||||
if valType.Key().Kind() != reflect.String {
|
||||
return fmt.Errorf("only maps with string key type can be unmarshalled")
|
||||
}
|
||||
ismap = true
|
||||
} else if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
var dummy map[string]interface{}
|
||||
pmap = reflect.New(reflect.TypeOf(dummy)).Elem()
|
||||
valType = pmap.Type()
|
||||
ismap = true
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
var fields map[string]reflect.Value
|
||||
|
||||
if !ismap {
|
||||
fields = make(map[string]reflect.Value)
|
||||
buildStructFieldMap(&fields, val)
|
||||
} else {
|
||||
// Create initial empty map
|
||||
pmap.Set(reflect.MakeMap(valType))
|
||||
}
|
||||
|
||||
// Process struct members.
|
||||
StructLoop:
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
switch t := tok.(type) {
|
||||
case xml.StartElement:
|
||||
if t.Name.Local != "member" {
|
||||
return invalidXmlError
|
||||
}
|
||||
|
||||
tagName, fieldName, err := dec.readTag()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if tagName != "name" {
|
||||
return invalidXmlError
|
||||
}
|
||||
|
||||
var fv reflect.Value
|
||||
ok := true
|
||||
|
||||
if !ismap {
|
||||
fv, ok = fields[string(fieldName)]
|
||||
} else {
|
||||
fv = reflect.New(valType.Elem())
|
||||
}
|
||||
|
||||
if ok {
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
if t, ok := tok.(xml.StartElement); ok && t.Name.Local == "value" {
|
||||
if err = dec.decodeValue(fv); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// </value>
|
||||
if err = dec.Skip(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// </member>
|
||||
if err = dec.Skip(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if ismap {
|
||||
pmap.SetMapIndex(reflect.ValueOf(string(fieldName)), reflect.Indirect(fv))
|
||||
val.Set(pmap)
|
||||
}
|
||||
case xml.EndElement:
|
||||
break StructLoop
|
||||
}
|
||||
}
|
||||
case "array":
|
||||
pslice := val
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
var dummy []interface{}
|
||||
pslice = reflect.New(reflect.TypeOf(dummy)).Elem()
|
||||
} else if err = checkType(val, reflect.Slice); err != nil {
|
||||
// Check to see if we have an unexpected array when we expect
|
||||
// a struct. Adjust by expecting an array of the struct type
|
||||
// and see if things still work.
|
||||
// https://github.com/renier/xmlrpc/pull/2
|
||||
if val.Kind() == reflect.Struct {
|
||||
pslice = reflect.New(reflect.SliceOf(reflect.TypeOf(val.Interface()))).Elem()
|
||||
val = pslice
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
ArrayLoop:
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch t := tok.(type) {
|
||||
case xml.StartElement:
|
||||
if t.Name.Local != "data" {
|
||||
return invalidXmlError
|
||||
}
|
||||
|
||||
slice := reflect.MakeSlice(pslice.Type(), 0, 0)
|
||||
|
||||
DataLoop:
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch tt := tok.(type) {
|
||||
case xml.StartElement:
|
||||
if tt.Name.Local != "value" {
|
||||
return invalidXmlError
|
||||
}
|
||||
|
||||
v := reflect.New(pslice.Type().Elem())
|
||||
if err = dec.decodeValue(v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
slice = reflect.Append(slice, v.Elem())
|
||||
|
||||
// </value>
|
||||
if err = dec.Skip(); err != nil {
|
||||
return err
|
||||
}
|
||||
case xml.EndElement:
|
||||
pslice.Set(slice)
|
||||
val.Set(pslice)
|
||||
break DataLoop
|
||||
}
|
||||
}
|
||||
case xml.EndElement:
|
||||
break ArrayLoop
|
||||
}
|
||||
}
|
||||
default:
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var data []byte
|
||||
|
||||
switch t := tok.(type) {
|
||||
case xml.EndElement:
|
||||
return nil
|
||||
case xml.CharData:
|
||||
data = []byte(t.Copy())
|
||||
default:
|
||||
return invalidXmlError
|
||||
}
|
||||
|
||||
ParseValue:
|
||||
switch typeName {
|
||||
case "int", "i4", "i8":
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
i, err := strconv.ParseInt(string(data), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pi := reflect.New(reflect.TypeOf(i)).Elem()
|
||||
pi.SetInt(i)
|
||||
val.Set(pi)
|
||||
} else if err = checkType(val, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64); err != nil {
|
||||
return err
|
||||
} else {
|
||||
k := val.Kind()
|
||||
isInt := k == reflect.Int || k == reflect.Int8 || k == reflect.Int16 || k == reflect.Int32 || k == reflect.Int64
|
||||
|
||||
if isInt {
|
||||
i, err := strconv.ParseInt(string(data), 10, val.Type().Bits())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
val.SetInt(i)
|
||||
} else {
|
||||
i, err := strconv.ParseUint(string(data), 10, val.Type().Bits())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
val.SetUint(i)
|
||||
}
|
||||
}
|
||||
case "string", "base64":
|
||||
str := string(data)
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
pstr := reflect.New(reflect.TypeOf(str)).Elem()
|
||||
pstr.SetString(str)
|
||||
val.Set(pstr)
|
||||
} else if err = checkType(val, reflect.String); err != nil {
|
||||
valName := val.Type().Name()
|
||||
if valName == "" {
|
||||
valName = reflect.Indirect(val).Type().Name()
|
||||
}
|
||||
|
||||
if valName == "Time" {
|
||||
timeField := val.FieldByName(valName)
|
||||
if timeField.IsValid() {
|
||||
val = timeField
|
||||
}
|
||||
typeName = "dateTime.iso8601"
|
||||
goto ParseValue
|
||||
} else if strings.HasPrefix(strings.ToLower(valName), "float") {
|
||||
typeName = "double"
|
||||
goto ParseValue
|
||||
}
|
||||
return err
|
||||
} else {
|
||||
val.SetString(str)
|
||||
}
|
||||
case "dateTime.iso8601":
|
||||
err = nil
|
||||
var t time.Time
|
||||
for _, df := range dateFormats {
|
||||
t, err = time.Parse(df, string(data))
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
ptime := reflect.New(reflect.TypeOf(t)).Elem()
|
||||
ptime.Set(reflect.ValueOf(t))
|
||||
val.Set(ptime)
|
||||
} else if !reflect.TypeOf((time.Time)(t)).ConvertibleTo(val.Type()) {
|
||||
return TypeMismatchError(
|
||||
fmt.Sprintf(
|
||||
"error: type mismatch error - can't decode %v (%s.%s) to time",
|
||||
val.Kind(),
|
||||
val.Type().PkgPath(),
|
||||
val.Type().Name(),
|
||||
),
|
||||
)
|
||||
} else {
|
||||
val.Set(reflect.ValueOf(t).Convert(val.Type()))
|
||||
}
|
||||
case "boolean":
|
||||
v, err := strconv.ParseBool(string(data))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
pv := reflect.New(reflect.TypeOf(v)).Elem()
|
||||
pv.SetBool(v)
|
||||
val.Set(pv)
|
||||
} else if err = checkType(val, reflect.Bool); err != nil {
|
||||
return err
|
||||
} else {
|
||||
val.SetBool(v)
|
||||
}
|
||||
case "double":
|
||||
if checkType(val, reflect.Interface) == nil && val.IsNil() {
|
||||
i, err := strconv.ParseFloat(string(data), 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pdouble := reflect.New(reflect.TypeOf(i)).Elem()
|
||||
pdouble.SetFloat(i)
|
||||
val.Set(pdouble)
|
||||
} else if err = checkType(val, reflect.Float32, reflect.Float64); err != nil {
|
||||
return err
|
||||
} else {
|
||||
i, err := strconv.ParseFloat(string(data), val.Type().Bits())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
val.SetFloat(i)
|
||||
}
|
||||
default:
|
||||
return errors.New("unsupported type")
|
||||
}
|
||||
|
||||
// </type>
|
||||
if err = dec.Skip(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dec *decoder) readTag() (string, []byte, error) {
|
||||
var tok xml.Token
|
||||
var err error
|
||||
|
||||
var name string
|
||||
for {
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
if t, ok := tok.(xml.StartElement); ok {
|
||||
name = t.Name.Local
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
value, err := dec.readCharData()
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
return name, value, dec.Skip()
|
||||
}
|
||||
|
||||
func (dec *decoder) readCharData() ([]byte, error) {
|
||||
var tok xml.Token
|
||||
var err error
|
||||
|
||||
if tok, err = dec.Token(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if t, ok := tok.(xml.CharData); ok {
|
||||
return []byte(t.Copy()), nil
|
||||
} else {
|
||||
return nil, invalidXmlError
|
||||
}
|
||||
}
|
||||
|
||||
func checkType(val reflect.Value, kinds ...reflect.Kind) error {
|
||||
if len(kinds) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if val.Kind() == reflect.Ptr {
|
||||
val = val.Elem()
|
||||
}
|
||||
|
||||
match := false
|
||||
|
||||
for _, kind := range kinds {
|
||||
if val.Kind() == kind {
|
||||
match = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !match {
|
||||
return TypeMismatchError(fmt.Sprintf("error: type mismatch - can't unmarshal %v to %v",
|
||||
val.Kind(), kinds[0]))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func buildStructFieldMap(fieldMap *map[string]reflect.Value, val reflect.Value) {
|
||||
valType := val.Type()
|
||||
valFieldNum := valType.NumField()
|
||||
for i := 0; i < valFieldNum; i++ {
|
||||
field := valType.Field(i)
|
||||
fieldVal := val.FieldByName(field.Name)
|
||||
|
||||
if field.Anonymous {
|
||||
// Drill down into embedded structs
|
||||
buildStructFieldMap(fieldMap, fieldVal)
|
||||
continue
|
||||
}
|
||||
|
||||
if fieldVal.CanSet() {
|
||||
if fn := field.Tag.Get("xmlrpc"); fn != "" {
|
||||
fn = strings.Split(fn, ",")[0]
|
||||
(*fieldMap)[fn] = fieldVal
|
||||
} else {
|
||||
(*fieldMap)[field.Name] = fieldVal
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// http://stackoverflow.com/a/34712322/3160958
|
||||
// https://groups.google.com/forum/#!topic/golang-nuts/VudK_05B62k
|
||||
func defaultCharsetReader(charset string, input io.Reader) (io.Reader, error) {
|
||||
if charset == "iso-8859-1" || charset == "ISO-8859-1" {
|
||||
return charmap.ISO8859_1.NewDecoder().Reader(input), nil
|
||||
} else if strings.HasPrefix(charset, "utf") || strings.HasPrefix(charset, "UTF") {
|
||||
return input, nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("Unknown charset: %s", charset)
|
||||
}
|
204
vendor/github.com/renier/xmlrpc/encoder.go
generated
vendored
Normal file
204
vendor/github.com/renier/xmlrpc/encoder.go
generated
vendored
Normal file
|
@ -0,0 +1,204 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type encodeFunc func(reflect.Value) ([]byte, error)
|
||||
|
||||
func marshal(v interface{}) ([]byte, error) {
|
||||
if v == nil {
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
val := reflect.ValueOf(v)
|
||||
return encodeValue(val)
|
||||
}
|
||||
|
||||
func encodeValue(val reflect.Value) ([]byte, error) {
|
||||
var b []byte
|
||||
var err error
|
||||
|
||||
if val.Kind() == reflect.Ptr || val.Kind() == reflect.Interface {
|
||||
if val.IsNil() {
|
||||
return []byte("<value/>"), nil
|
||||
}
|
||||
|
||||
val = val.Elem()
|
||||
}
|
||||
|
||||
switch val.Kind() {
|
||||
case reflect.Struct:
|
||||
switch val.Interface().(type) {
|
||||
case time.Time:
|
||||
t := val.Interface().(time.Time)
|
||||
b = []byte(fmt.Sprintf("<dateTime.iso8601>%s</dateTime.iso8601>", t.Format(iso8601)))
|
||||
default:
|
||||
b, err = encodeStruct(val)
|
||||
}
|
||||
case reflect.Map:
|
||||
b, err = encodeMap(val)
|
||||
case reflect.Slice:
|
||||
b, err = encodeSlice(val)
|
||||
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
|
||||
b = []byte(fmt.Sprintf("<int>%s</int>", strconv.FormatInt(val.Int(), 10)))
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
b = []byte(fmt.Sprintf("<i4>%s</i4>", strconv.FormatUint(val.Uint(), 10)))
|
||||
case reflect.Float32, reflect.Float64:
|
||||
b = []byte(fmt.Sprintf("<double>%s</double>",
|
||||
strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits())))
|
||||
case reflect.Bool:
|
||||
if val.Bool() {
|
||||
b = []byte("<boolean>1</boolean>")
|
||||
} else {
|
||||
b = []byte("<boolean>0</boolean>")
|
||||
}
|
||||
case reflect.String:
|
||||
var buf bytes.Buffer
|
||||
|
||||
xml.Escape(&buf, []byte(val.String()))
|
||||
|
||||
if _, ok := val.Interface().(Base64); ok {
|
||||
b = []byte(fmt.Sprintf("<base64>%s</base64>", buf.String()))
|
||||
} else {
|
||||
b = []byte(fmt.Sprintf("<string>%s</string>", buf.String()))
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("xmlrpc encode error: unsupported type")
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return []byte(fmt.Sprintf("<value>%s</value>", string(b))), nil
|
||||
}
|
||||
|
||||
func encodeStruct(value reflect.Value) ([]byte, error) {
|
||||
var b bytes.Buffer
|
||||
|
||||
b.WriteString("<struct>")
|
||||
|
||||
vals := []reflect.Value{value}
|
||||
for j := 0; j < len(vals); j++ {
|
||||
val := vals[j]
|
||||
t := val.Type()
|
||||
for i := 0; i < t.NumField(); i++ {
|
||||
f := t.Field(i)
|
||||
tag := f.Tag.Get("xmlrpc")
|
||||
name := f.Name
|
||||
fieldVal := val.FieldByName(f.Name)
|
||||
fieldValKind := fieldVal.Kind()
|
||||
|
||||
// Omit unexported fields
|
||||
if !fieldVal.CanInterface() {
|
||||
continue
|
||||
}
|
||||
|
||||
// Omit fields who are structs that contain no fields themselves
|
||||
if fieldValKind == reflect.Struct && fieldVal.NumField() == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Omit empty slices
|
||||
if fieldValKind == reflect.Slice && fieldVal.Len() == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Omit empty fields (defined as nil pointers)
|
||||
if tag != "" {
|
||||
parts := strings.Split(tag, ",")
|
||||
name = parts[0]
|
||||
if len(parts) > 1 && parts[1] == "omitempty" {
|
||||
if fieldValKind == reflect.Ptr && fieldVal.IsNil() {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Drill down into anonymous/embedded structs and do not expose the
|
||||
// containing embedded struct in request.
|
||||
// This will effectively pull up fields in embedded structs to look
|
||||
// as part of the original struct in the request.
|
||||
if f.Anonymous {
|
||||
vals = append(vals, fieldVal)
|
||||
continue
|
||||
}
|
||||
|
||||
b.WriteString("<member>")
|
||||
b.WriteString(fmt.Sprintf("<name>%s</name>", name))
|
||||
|
||||
p, err := encodeValue(fieldVal)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.Write(p)
|
||||
|
||||
b.WriteString("</member>")
|
||||
}
|
||||
}
|
||||
|
||||
b.WriteString("</struct>")
|
||||
|
||||
return b.Bytes(), nil
|
||||
}
|
||||
|
||||
func encodeMap(val reflect.Value) ([]byte, error) {
|
||||
var t = val.Type()
|
||||
|
||||
if t.Key().Kind() != reflect.String {
|
||||
return nil, fmt.Errorf("xmlrpc encode error: only maps with string keys are supported")
|
||||
}
|
||||
|
||||
var b bytes.Buffer
|
||||
|
||||
b.WriteString("<struct>")
|
||||
|
||||
keys := val.MapKeys()
|
||||
|
||||
for i := 0; i < val.Len(); i++ {
|
||||
key := keys[i]
|
||||
kval := val.MapIndex(key)
|
||||
|
||||
b.WriteString("<member>")
|
||||
b.WriteString(fmt.Sprintf("<name>%s</name>", key.String()))
|
||||
|
||||
p, err := encodeValue(kval)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
b.Write(p)
|
||||
b.WriteString("</member>")
|
||||
}
|
||||
|
||||
b.WriteString("</struct>")
|
||||
|
||||
return b.Bytes(), nil
|
||||
}
|
||||
|
||||
func encodeSlice(val reflect.Value) ([]byte, error) {
|
||||
var b bytes.Buffer
|
||||
|
||||
b.WriteString("<array><data>")
|
||||
|
||||
for i := 0; i < val.Len(); i++ {
|
||||
p, err := encodeValue(val.Index(i))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
b.Write(p)
|
||||
}
|
||||
|
||||
b.WriteString("</data></array>")
|
||||
|
||||
return b.Bytes(), nil
|
||||
}
|
57
vendor/github.com/renier/xmlrpc/request.go
generated
vendored
Normal file
57
vendor/github.com/renier/xmlrpc/request.go
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func NewRequest(url string, method string, args interface{}) (*http.Request, error) {
|
||||
var t []interface{}
|
||||
var ok bool
|
||||
if t, ok = args.([]interface{}); !ok {
|
||||
if args != nil {
|
||||
t = []interface{}{args}
|
||||
}
|
||||
}
|
||||
|
||||
body, err := EncodeMethodCall(method, t...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request, err := http.NewRequest("POST", url, bytes.NewReader(body))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
request.Header.Set("Content-Type", "text/xml")
|
||||
request.Header.Set("Content-Length", fmt.Sprintf("%d", len(body)))
|
||||
|
||||
return request, nil
|
||||
}
|
||||
|
||||
func EncodeMethodCall(method string, args ...interface{}) ([]byte, error) {
|
||||
var b bytes.Buffer
|
||||
b.WriteString(`<?xml version="1.0" encoding="UTF-8"?>`)
|
||||
b.WriteString(fmt.Sprintf("<methodCall><methodName>%s</methodName>", method))
|
||||
|
||||
if args != nil {
|
||||
b.WriteString("<params>")
|
||||
|
||||
for _, arg := range args {
|
||||
p, err := marshal(arg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
b.WriteString(fmt.Sprintf("<param>%s</param>", string(p)))
|
||||
}
|
||||
|
||||
b.WriteString("</params>")
|
||||
}
|
||||
|
||||
b.WriteString("</methodCall>")
|
||||
|
||||
return b.Bytes(), nil
|
||||
}
|
57
vendor/github.com/renier/xmlrpc/response.go
generated
vendored
Normal file
57
vendor/github.com/renier/xmlrpc/response.go
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
faultRx = regexp.MustCompile(`<fault>(\s|\S)+</fault>`)
|
||||
)
|
||||
|
||||
type failedResponse struct {
|
||||
Code interface{} `xmlrpc:"faultCode"`
|
||||
Error string `xmlrpc:"faultString"`
|
||||
HttpStatusCode int
|
||||
}
|
||||
|
||||
func (r *failedResponse) err() error {
|
||||
return &XmlRpcError{
|
||||
Code: r.Code,
|
||||
Err: r.Error,
|
||||
HttpStatusCode: r.HttpStatusCode,
|
||||
}
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
data []byte
|
||||
httpStatusCode int
|
||||
}
|
||||
|
||||
func NewResponse(data []byte, httpStatusCode int) *Response {
|
||||
return &Response{
|
||||
data: data,
|
||||
httpStatusCode: httpStatusCode,
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Response) Failed() bool {
|
||||
return faultRx.Match(r.data)
|
||||
}
|
||||
|
||||
func (r *Response) Err() error {
|
||||
failedResp := new(failedResponse)
|
||||
if err := unmarshal(r.data, failedResp); err != nil {
|
||||
return err
|
||||
}
|
||||
failedResp.HttpStatusCode = r.httpStatusCode
|
||||
|
||||
return failedResp.err()
|
||||
}
|
||||
|
||||
func (r *Response) Unmarshal(v interface{}) error {
|
||||
if err := unmarshal(r.data, v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
25
vendor/github.com/renier/xmlrpc/test_server.rb
generated
vendored
Normal file
25
vendor/github.com/renier/xmlrpc/test_server.rb
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
# encoding: utf-8
|
||||
|
||||
require "xmlrpc/server"
|
||||
|
||||
class Service
|
||||
def time
|
||||
Time.now
|
||||
end
|
||||
|
||||
def upcase(s)
|
||||
s.upcase
|
||||
end
|
||||
|
||||
def sum(x, y)
|
||||
x + y
|
||||
end
|
||||
|
||||
def error
|
||||
raise XMLRPC::FaultException.new(500, "Server error")
|
||||
end
|
||||
end
|
||||
|
||||
server = XMLRPC::Server.new 5001, 'localhost'
|
||||
server.add_handler "service", Service.new
|
||||
server.serve
|
28
vendor/github.com/renier/xmlrpc/xmlrpc.go
generated
vendored
Normal file
28
vendor/github.com/renier/xmlrpc/xmlrpc.go
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
package xmlrpc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// xmlrpcError represents errors returned on xmlrpc request.
|
||||
type XmlRpcError struct {
|
||||
Code interface{}
|
||||
Err string
|
||||
HttpStatusCode int
|
||||
}
|
||||
|
||||
// Error() method implements Error interface
|
||||
func (e *XmlRpcError) Error() string {
|
||||
return fmt.Sprintf(
|
||||
"error: %s, code: %v, http status code: %d",
|
||||
e.Err, e.Code, e.HttpStatusCode)
|
||||
}
|
||||
|
||||
// Base64 represents value in base64 encoding
|
||||
type Base64 string
|
||||
|
||||
type Params struct {
|
||||
Params []interface{}
|
||||
}
|
||||
|
||||
type Struct map[string]interface{}
|
202
vendor/github.com/softlayer/softlayer-go/LICENSE
generated
vendored
Normal file
202
vendor/github.com/softlayer/softlayer-go/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,202 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
145
vendor/github.com/softlayer/softlayer-go/config/config.go
generated
vendored
Normal file
145
vendor/github.com/softlayer/softlayer-go/config/config.go
generated
vendored
Normal file
|
@ -0,0 +1,145 @@
|
|||
/**
|
||||
* // This file is borrowed from https://github.com/vaughan0/go-ini/blob/master/ini.go
|
||||
* // which is distributed under the MIT license (https://github.com/vaughan0/go-ini/blob/master/LICENSE).
|
||||
*
|
||||
* Copyright (c) 2013 Vaughan Newton
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
* associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
* following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
* portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Package config provides functions for parsing INI configuration files.
|
||||
package config
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
sectionRegex = regexp.MustCompile(`^\[(.*)\]$`)
|
||||
assignRegex = regexp.MustCompile(`^([^=]+)=(.*)$`)
|
||||
)
|
||||
|
||||
// ErrSyntax is returned when there is a syntax error in an INI file.
|
||||
type ErrSyntax struct {
|
||||
Line int
|
||||
Source string // The contents of the erroneous line, without leading or trailing whitespace
|
||||
}
|
||||
|
||||
func (e ErrSyntax) Error() string {
|
||||
return fmt.Sprintf("invalid INI syntax on line %d: %s", e.Line, e.Source)
|
||||
}
|
||||
|
||||
// A File represents a parsed INI file.
|
||||
type File map[string]Section
|
||||
|
||||
// A Section represents a single section of an INI file.
|
||||
type Section map[string]string
|
||||
|
||||
// Returns a named Section. A Section will be created if one does not already exist for the given name.
|
||||
func (f File) Section(name string) Section {
|
||||
section := f[name]
|
||||
if section == nil {
|
||||
section = make(Section)
|
||||
f[name] = section
|
||||
}
|
||||
return section
|
||||
}
|
||||
|
||||
// Looks up a value for a key in a section and returns that value, along with a boolean result similar to a map lookup.
|
||||
func (f File) Get(section, key string) (value string, ok bool) {
|
||||
if s := f[section]; s != nil {
|
||||
value, ok = s[key]
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Loads INI data from a reader and stores the data in the File.
|
||||
func (f File) Load(in io.Reader) error {
|
||||
bufin, ok := in.(*bufio.Reader)
|
||||
if !ok {
|
||||
bufin = bufio.NewReader(in)
|
||||
}
|
||||
return parseFile(bufin, f)
|
||||
}
|
||||
|
||||
// Loads INI data from a named file and stores the data in the File.
|
||||
func (f File) LoadFile(file string) (err error) {
|
||||
in, err := os.Open(file)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer in.Close()
|
||||
return f.Load(in)
|
||||
}
|
||||
|
||||
func parseFile(in *bufio.Reader, file File) (err error) {
|
||||
section := ""
|
||||
lineNum := 0
|
||||
for done := false; !done; {
|
||||
var line string
|
||||
if line, err = in.ReadString('\n'); err != nil {
|
||||
if err == io.EOF {
|
||||
done = true
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
lineNum++
|
||||
line = strings.TrimSpace(line)
|
||||
if len(line) == 0 {
|
||||
// Skip blank lines
|
||||
continue
|
||||
}
|
||||
if line[0] == ';' || line[0] == '#' {
|
||||
// Skip comments
|
||||
continue
|
||||
}
|
||||
|
||||
if groups := assignRegex.FindStringSubmatch(line); groups != nil {
|
||||
key, val := groups[1], groups[2]
|
||||
key, val = strings.TrimSpace(key), strings.TrimSpace(val)
|
||||
file.Section(section)[key] = val
|
||||
} else if groups := sectionRegex.FindStringSubmatch(line); groups != nil {
|
||||
name := strings.TrimSpace(groups[1])
|
||||
section = name
|
||||
// Create the section if it does not exist
|
||||
file.Section(section)
|
||||
} else {
|
||||
return ErrSyntax{Line: lineNum, Source: line}
|
||||
}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Loads and returns a File from a reader.
|
||||
func Load(in io.Reader) (File, error) {
|
||||
file := make(File)
|
||||
err := file.Load(in)
|
||||
return file, err
|
||||
}
|
||||
|
||||
// Loads and returns an INI File from a file on disk.
|
||||
func LoadFile(filename string) (File, error) {
|
||||
file := make(File)
|
||||
err := file.LoadFile(filename)
|
||||
return file, err
|
||||
}
|
32
vendor/github.com/softlayer/softlayer-go/datatypes/abuse.go
generated
vendored
Normal file
32
vendor/github.com/softlayer/softlayer-go/datatypes/abuse.go
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Abuse_Lockdown_Resource struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
InvoiceItem *Billing_Invoice_Item `json:"invoiceItem,omitempty" xmlrpc:"invoiceItem,omitempty"`
|
||||
}
|
2785
vendor/github.com/softlayer/softlayer-go/datatypes/account.go
generated
vendored
Normal file
2785
vendor/github.com/softlayer/softlayer-go/datatypes/account.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
342
vendor/github.com/softlayer/softlayer-go/datatypes/auxiliary.go
generated
vendored
Normal file
342
vendor/github.com/softlayer/softlayer-go/datatypes/auxiliary.go
generated
vendored
Normal file
|
@ -0,0 +1,342 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Marketing_Event struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EnabledFlag *int `json:"enabledFlag,omitempty" xmlrpc:"enabledFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Location *string `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Title *string `json:"title,omitempty" xmlrpc:"title,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Url *string `json:"url,omitempty" xmlrpc:"url,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Network_Status struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// A SoftLayer_Auxiliary_Notification_Emergency data object represents a notification event being broadcast to the SoftLayer customer base. It is used to provide information regarding outages or current known issues.
|
||||
type Auxiliary_Notification_Emergency struct {
|
||||
Entity
|
||||
|
||||
// The date this event was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The device (if any) effected by this event.
|
||||
Device *string `json:"device,omitempty" xmlrpc:"device,omitempty"`
|
||||
|
||||
// The duration of this event.
|
||||
Duration *string `json:"duration,omitempty" xmlrpc:"duration,omitempty"`
|
||||
|
||||
// The device (if any) effected by this event.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The location effected by this event.
|
||||
Location *string `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// A message describing this event.
|
||||
Message *string `json:"message,omitempty" xmlrpc:"message,omitempty"`
|
||||
|
||||
// The last date this event was modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The service(s) (if any) effected by this event.
|
||||
ServicesAffected *string `json:"servicesAffected,omitempty" xmlrpc:"servicesAffected,omitempty"`
|
||||
|
||||
// The signature of the SoftLayer employee department associated with this notification.
|
||||
Signature *Auxiliary_Notification_Emergency_Signature `json:"signature,omitempty" xmlrpc:"signature,omitempty"`
|
||||
|
||||
// The date this event will start.
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// The status of this notification.
|
||||
Status *Auxiliary_Notification_Emergency_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// Current status record for this event.
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
}
|
||||
|
||||
// Every SoftLayer_Auxiliary_Notification_Emergency has a signatureId that references a SoftLayer_Auxiliary_Notification_Emergency_Signature data type. The signature is the user or group responsible for the current event.
|
||||
type Auxiliary_Notification_Emergency_Signature struct {
|
||||
Entity
|
||||
|
||||
// The name or signature for the current Emergency Notification.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// Every SoftLayer_Auxiliary_Notification_Emergency has a statusId that references a SoftLayer_Auxiliary_Notification_Emergency_Status data type. The status is used to determine the current state of the event.
|
||||
type Auxiliary_Notification_Emergency_Status struct {
|
||||
Entity
|
||||
|
||||
// A name describing the status of the current Emergency Notification.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
About []Auxiliary_Press_Release_About_Press_Release `json:"about,omitempty" xmlrpc:"about,omitempty"`
|
||||
|
||||
// A count of
|
||||
AboutCount *uint `json:"aboutCount,omitempty" xmlrpc:"aboutCount,omitempty"`
|
||||
|
||||
// A count of
|
||||
ContactCount *uint `json:"contactCount,omitempty" xmlrpc:"contactCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Contacts []Auxiliary_Press_Release_Contact_Press_Release `json:"contacts,omitempty" xmlrpc:"contacts,omitempty"`
|
||||
|
||||
// A press release's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of
|
||||
MediaPartnerCount *uint `json:"mediaPartnerCount,omitempty" xmlrpc:"mediaPartnerCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MediaPartners []Auxiliary_Press_Release_Media_Partner_Press_Release `json:"mediaPartners,omitempty" xmlrpc:"mediaPartners,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PressReleaseContent *Auxiliary_Press_Release_Content `json:"pressReleaseContent,omitempty" xmlrpc:"pressReleaseContent,omitempty"`
|
||||
|
||||
// The data a press release was published.
|
||||
PublishDate *Time `json:"publishDate,omitempty" xmlrpc:"publishDate,omitempty"`
|
||||
|
||||
// A press release's location.
|
||||
ReleaseLocation *string `json:"releaseLocation,omitempty" xmlrpc:"releaseLocation,omitempty"`
|
||||
|
||||
// A press release's sub-title.
|
||||
SubTitle *string `json:"subTitle,omitempty" xmlrpc:"subTitle,omitempty"`
|
||||
|
||||
// A press release's title.
|
||||
Title *string `json:"title,omitempty" xmlrpc:"title,omitempty"`
|
||||
|
||||
// Whether or not a press release is highlighted on the SoftLayer Website.
|
||||
WebsiteHighlightFlag *bool `json:"websiteHighlightFlag,omitempty" xmlrpc:"websiteHighlightFlag,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_About struct {
|
||||
Entity
|
||||
|
||||
// A press release about's content.
|
||||
Content *string `json:"content,omitempty" xmlrpc:"content,omitempty"`
|
||||
|
||||
// A press release about's internal
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A press release about's title.
|
||||
Title *string `json:"title,omitempty" xmlrpc:"title,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_About_Press_Release struct {
|
||||
Entity
|
||||
|
||||
// A count of
|
||||
AboutParagraphCount *uint `json:"aboutParagraphCount,omitempty" xmlrpc:"aboutParagraphCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AboutParagraphs []Auxiliary_Press_Release_About `json:"aboutParagraphs,omitempty" xmlrpc:"aboutParagraphs,omitempty"`
|
||||
|
||||
// A press release about cross
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A press release about's internal
|
||||
PressReleaseAboutId *int `json:"pressReleaseAboutId,omitempty" xmlrpc:"pressReleaseAboutId,omitempty"`
|
||||
|
||||
// A count of
|
||||
PressReleaseCount *uint `json:"pressReleaseCount,omitempty" xmlrpc:"pressReleaseCount,omitempty"`
|
||||
|
||||
// A press release internal identifier.
|
||||
PressReleaseId *int `json:"pressReleaseId,omitempty" xmlrpc:"pressReleaseId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PressReleases []Auxiliary_Press_Release `json:"pressReleases,omitempty" xmlrpc:"pressReleases,omitempty"`
|
||||
|
||||
// The number that associated an about
|
||||
SortOrder *int `json:"sortOrder,omitempty" xmlrpc:"sortOrder,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Contact struct {
|
||||
Entity
|
||||
|
||||
// A press release contact's email
|
||||
Email *string `json:"email,omitempty" xmlrpc:"email,omitempty"`
|
||||
|
||||
// A press release contact's first name.
|
||||
FirstName *string `json:"firstName,omitempty" xmlrpc:"firstName,omitempty"`
|
||||
|
||||
// A press release contact's internal
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A press release contact's last name.
|
||||
LastName *string `json:"lastName,omitempty" xmlrpc:"lastName,omitempty"`
|
||||
|
||||
// A press release contact's phone
|
||||
Phone *string `json:"phone,omitempty" xmlrpc:"phone,omitempty"`
|
||||
|
||||
// A press release contact's
|
||||
ProfessionalTitle *string `json:"professionalTitle,omitempty" xmlrpc:"professionalTitle,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Contact_Press_Release struct {
|
||||
Entity
|
||||
|
||||
// A count of
|
||||
ContactCount *uint `json:"contactCount,omitempty" xmlrpc:"contactCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Contacts []Auxiliary_Press_Release_Contact `json:"contacts,omitempty" xmlrpc:"contacts,omitempty"`
|
||||
|
||||
// A press release contact cross
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A press release contact's internal
|
||||
PressReleaseContactId *int `json:"pressReleaseContactId,omitempty" xmlrpc:"pressReleaseContactId,omitempty"`
|
||||
|
||||
// A count of
|
||||
PressReleaseCount *uint `json:"pressReleaseCount,omitempty" xmlrpc:"pressReleaseCount,omitempty"`
|
||||
|
||||
// A press release internal identifier.
|
||||
PressReleaseId *int `json:"pressReleaseId,omitempty" xmlrpc:"pressReleaseId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PressReleases []Auxiliary_Press_Release `json:"pressReleases,omitempty" xmlrpc:"pressReleases,omitempty"`
|
||||
|
||||
// The number that associated a contact
|
||||
SortOrder *int `json:"sortOrder,omitempty" xmlrpc:"sortOrder,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Content struct {
|
||||
Entity
|
||||
|
||||
// the id of a single press release
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// the press release id that the content
|
||||
PressReleaseId *int `json:"pressReleaseId,omitempty" xmlrpc:"pressReleaseId,omitempty"`
|
||||
|
||||
// the content of a press release
|
||||
Text *string `json:"text,omitempty" xmlrpc:"text,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Media_Partner struct {
|
||||
Entity
|
||||
|
||||
// A press release media partner's
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A press release media partner's name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Media_Partner_Press_Release struct {
|
||||
Entity
|
||||
|
||||
// A press release media partner cross
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of
|
||||
MediaPartnerCount *uint `json:"mediaPartnerCount,omitempty" xmlrpc:"mediaPartnerCount,omitempty"`
|
||||
|
||||
// A press release media partner's
|
||||
MediaPartnerId *int `json:"mediaPartnerId,omitempty" xmlrpc:"mediaPartnerId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MediaPartners []Auxiliary_Press_Release_Media_Partner `json:"mediaPartners,omitempty" xmlrpc:"mediaPartners,omitempty"`
|
||||
|
||||
// A count of
|
||||
PressReleaseCount *uint `json:"pressReleaseCount,omitempty" xmlrpc:"pressReleaseCount,omitempty"`
|
||||
|
||||
// A press release internal identifier.
|
||||
PressReleaseId *int `json:"pressReleaseId,omitempty" xmlrpc:"pressReleaseId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PressReleases []Auxiliary_Press_Release `json:"pressReleases,omitempty" xmlrpc:"pressReleases,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Auxiliary_Shipping_Courier data type contains general information relating the different (major) couriers that SoftLayer may use for shipping.
|
||||
type Auxiliary_Shipping_Courier struct {
|
||||
Entity
|
||||
|
||||
// The unique id of the shipping courier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique keyname of the shipping courier.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// The name of the shipping courier.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The url to shipping courier's website.
|
||||
Url *string `json:"url,omitempty" xmlrpc:"url,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Shipping_Courier_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Courier []Auxiliary_Shipping_Courier `json:"courier,omitempty" xmlrpc:"courier,omitempty"`
|
||||
|
||||
// A count of
|
||||
CourierCount *uint `json:"courierCount,omitempty" xmlrpc:"courierCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
2660
vendor/github.com/softlayer/softlayer-go/datatypes/billing.go
generated
vendored
Normal file
2660
vendor/github.com/softlayer/softlayer-go/datatypes/billing.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
227
vendor/github.com/softlayer/softlayer-go/datatypes/brand.go
generated
vendored
Normal file
227
vendor/github.com/softlayer/softlayer-go/datatypes/brand.go
generated
vendored
Normal file
|
@ -0,0 +1,227 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Brand data type contains brand information relating to the single SoftLayer customer account.
|
||||
//
|
||||
// SoftLayer customers are unable to change their brand information in the portal or the API.
|
||||
type Brand struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// A count of all accounts owned by the brand.
|
||||
AllOwnedAccountCount *uint `json:"allOwnedAccountCount,omitempty" xmlrpc:"allOwnedAccountCount,omitempty"`
|
||||
|
||||
// All accounts owned by the brand.
|
||||
AllOwnedAccounts []Account `json:"allOwnedAccounts,omitempty" xmlrpc:"allOwnedAccounts,omitempty"`
|
||||
|
||||
// This flag indicates if creation of accounts is allowed.
|
||||
AllowAccountCreationFlag *bool `json:"allowAccountCreationFlag,omitempty" xmlrpc:"allowAccountCreationFlag,omitempty"`
|
||||
|
||||
// The Product Catalog for the Brand
|
||||
Catalog *Product_Catalog `json:"catalog,omitempty" xmlrpc:"catalog,omitempty"`
|
||||
|
||||
// ID of the Catalog used by this Brand
|
||||
CatalogId *int `json:"catalogId,omitempty" xmlrpc:"catalogId,omitempty"`
|
||||
|
||||
// A count of the contacts for the brand.
|
||||
ContactCount *uint `json:"contactCount,omitempty" xmlrpc:"contactCount,omitempty"`
|
||||
|
||||
// The contacts for the brand.
|
||||
Contacts []Brand_Contact `json:"contacts,omitempty" xmlrpc:"contacts,omitempty"`
|
||||
|
||||
// A count of this references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
CustomerCountryLocationRestrictionCount *uint `json:"customerCountryLocationRestrictionCount,omitempty" xmlrpc:"customerCountryLocationRestrictionCount,omitempty"`
|
||||
|
||||
// This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
CustomerCountryLocationRestrictions []Brand_Restriction_Location_CustomerCountry `json:"customerCountryLocationRestrictions,omitempty" xmlrpc:"customerCountryLocationRestrictions,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Distributor *Brand `json:"distributor,omitempty" xmlrpc:"distributor,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DistributorChildFlag *bool `json:"distributorChildFlag,omitempty" xmlrpc:"distributorChildFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DistributorFlag *string `json:"distributorFlag,omitempty" xmlrpc:"distributorFlag,omitempty"`
|
||||
|
||||
// An account's associated hardware objects.
|
||||
Hardware []Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// A count of an account's associated hardware objects.
|
||||
HardwareCount *uint `json:"hardwareCount,omitempty" xmlrpc:"hardwareCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HasAgentSupportFlag *bool `json:"hasAgentSupportFlag,omitempty" xmlrpc:"hasAgentSupportFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The brand key name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// The brand long name.
|
||||
LongName *string `json:"longName,omitempty" xmlrpc:"longName,omitempty"`
|
||||
|
||||
// The brand name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of
|
||||
OpenTicketCount *uint `json:"openTicketCount,omitempty" xmlrpc:"openTicketCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
OpenTickets []Ticket `json:"openTickets,omitempty" xmlrpc:"openTickets,omitempty"`
|
||||
|
||||
// A count of active accounts owned by the brand.
|
||||
OwnedAccountCount *uint `json:"ownedAccountCount,omitempty" xmlrpc:"ownedAccountCount,omitempty"`
|
||||
|
||||
// Active accounts owned by the brand.
|
||||
OwnedAccounts []Account `json:"ownedAccounts,omitempty" xmlrpc:"ownedAccounts,omitempty"`
|
||||
|
||||
// A count of
|
||||
TicketCount *uint `json:"ticketCount,omitempty" xmlrpc:"ticketCount,omitempty"`
|
||||
|
||||
// A count of
|
||||
TicketGroupCount *uint `json:"ticketGroupCount,omitempty" xmlrpc:"ticketGroupCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketGroups []Ticket_Group `json:"ticketGroups,omitempty" xmlrpc:"ticketGroups,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Tickets []Ticket `json:"tickets,omitempty" xmlrpc:"tickets,omitempty"`
|
||||
|
||||
// A count of
|
||||
UserCount *uint `json:"userCount,omitempty" xmlrpc:"userCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Users []User_Customer `json:"users,omitempty" xmlrpc:"users,omitempty"`
|
||||
|
||||
// A count of an account's associated virtual guest objects.
|
||||
VirtualGuestCount *uint `json:"virtualGuestCount,omitempty" xmlrpc:"virtualGuestCount,omitempty"`
|
||||
|
||||
// An account's associated virtual guest objects.
|
||||
VirtualGuests []Virtual_Guest `json:"virtualGuests,omitempty" xmlrpc:"virtualGuests,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Brand_Attribute struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Brand *Brand `json:"brand,omitempty" xmlrpc:"brand,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Brand_Contact contains the contact information for the brand such as Corporate or Support contact information
|
||||
type Brand_Contact struct {
|
||||
Entity
|
||||
|
||||
// The contact's address 1.
|
||||
Address1 *string `json:"address1,omitempty" xmlrpc:"address1,omitempty"`
|
||||
|
||||
// The contact's address 2.
|
||||
Address2 *string `json:"address2,omitempty" xmlrpc:"address2,omitempty"`
|
||||
|
||||
// The contact's alternate phone number.
|
||||
AlternatePhone *string `json:"alternatePhone,omitempty" xmlrpc:"alternatePhone,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Brand *Brand `json:"brand,omitempty" xmlrpc:"brand,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
BrandContactType *Brand_Contact_Type `json:"brandContactType,omitempty" xmlrpc:"brandContactType,omitempty"`
|
||||
|
||||
// The contact's type identifier.
|
||||
BrandContactTypeId *int `json:"brandContactTypeId,omitempty" xmlrpc:"brandContactTypeId,omitempty"`
|
||||
|
||||
// The contact's city.
|
||||
City *string `json:"city,omitempty" xmlrpc:"city,omitempty"`
|
||||
|
||||
// The contact's country.
|
||||
Country *string `json:"country,omitempty" xmlrpc:"country,omitempty"`
|
||||
|
||||
// The contact's email address.
|
||||
Email *string `json:"email,omitempty" xmlrpc:"email,omitempty"`
|
||||
|
||||
// The contact's fax number.
|
||||
FaxPhone *string `json:"faxPhone,omitempty" xmlrpc:"faxPhone,omitempty"`
|
||||
|
||||
// The contact's first name.
|
||||
FirstName *string `json:"firstName,omitempty" xmlrpc:"firstName,omitempty"`
|
||||
|
||||
// The contact's last name.
|
||||
LastName *string `json:"lastName,omitempty" xmlrpc:"lastName,omitempty"`
|
||||
|
||||
// The contact's phone number.
|
||||
OfficePhone *string `json:"officePhone,omitempty" xmlrpc:"officePhone,omitempty"`
|
||||
|
||||
// The contact's postal code.
|
||||
PostalCode *string `json:"postalCode,omitempty" xmlrpc:"postalCode,omitempty"`
|
||||
|
||||
// The contact's state.
|
||||
State *string `json:"state,omitempty" xmlrpc:"state,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Brand_Contact_Type contains the contact type information for the brand contacts such as Corporate or Support contact type
|
||||
type Brand_Contact_Type struct {
|
||||
Entity
|
||||
|
||||
// Contact type description.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Contact type key name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// Contact type name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Brand_Payment_Processor struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Brand *Brand `json:"brand,omitempty" xmlrpc:"brand,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PaymentProcessor *Billing_Payment_Processor `json:"paymentProcessor,omitempty" xmlrpc:"paymentProcessor,omitempty"`
|
||||
}
|
||||
|
||||
// The [[SoftLayer_Brand_Restriction_Location_CustomerCountry]] data type defines the relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on the SoftLayer US brand for customers that live in Great Britain.
|
||||
type Brand_Restriction_Location_CustomerCountry struct {
|
||||
Entity
|
||||
|
||||
// This references the brand that has a brand-location-country restriction setup.
|
||||
Brand *Brand `json:"brand,omitempty" xmlrpc:"brand,omitempty"`
|
||||
|
||||
// The brand associated with customer's account.
|
||||
BrandId *int `json:"brandId,omitempty" xmlrpc:"brandId,omitempty"`
|
||||
|
||||
// country code associated with customer's account.
|
||||
CustomerCountryCode *string `json:"customerCountryCode,omitempty" xmlrpc:"customerCountryCode,omitempty"`
|
||||
|
||||
// This references the datacenter that has a brand-location-country restriction setup. For example, if a datacenter is listed with a restriction for Canada, a Canadian customer may not be eligible to order services at that location.
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// The id for datacenter location.
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
}
|
211
vendor/github.com/softlayer/softlayer-go/datatypes/catalyst.go
generated
vendored
Normal file
211
vendor/github.com/softlayer/softlayer-go/datatypes/catalyst.go
generated
vendored
Normal file
|
@ -0,0 +1,211 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Affiliate struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SkipCreditCardVerificationFlag *bool `json:"skipCreditCardVerificationFlag,omitempty" xmlrpc:"skipCreditCardVerificationFlag,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Company_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Enrollment struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Affiliate *Catalyst_Affiliate `json:"affiliate,omitempty" xmlrpc:"affiliate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AffiliateId *int `json:"affiliateId,omitempty" xmlrpc:"affiliateId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AgreementCompleteFlag *int `json:"agreementCompleteFlag,omitempty" xmlrpc:"agreementCompleteFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyDescription *string `json:"companyDescription,omitempty" xmlrpc:"companyDescription,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyType *Catalyst_Company_Type `json:"companyType,omitempty" xmlrpc:"companyType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyTypeId *int `json:"companyTypeId,omitempty" xmlrpc:"companyTypeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EnrollmentDate *Time `json:"enrollmentDate,omitempty" xmlrpc:"enrollmentDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
GraduationDate *Time `json:"graduationDate,omitempty" xmlrpc:"graduationDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
IsActiveFlag *bool `json:"isActiveFlag,omitempty" xmlrpc:"isActiveFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MonthlyCreditAmount *Float64 `json:"monthlyCreditAmount,omitempty" xmlrpc:"monthlyCreditAmount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Representative *User_Employee `json:"representative,omitempty" xmlrpc:"representative,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RepresentativeEmployeeId *int `json:"representativeEmployeeId,omitempty" xmlrpc:"representativeEmployeeId,omitempty"`
|
||||
}
|
||||
|
||||
// Contains user information for Catalyst self-enrollment.
|
||||
type Catalyst_Enrollment_Request struct {
|
||||
Entity
|
||||
|
||||
// Applicant's address
|
||||
Address1 *string `json:"address1,omitempty" xmlrpc:"address1,omitempty"`
|
||||
|
||||
// Additional field for extended address
|
||||
Address2 *string `json:"address2,omitempty" xmlrpc:"address2,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Affiliate *Catalyst_Affiliate `json:"affiliate,omitempty" xmlrpc:"affiliate,omitempty"`
|
||||
|
||||
// Id of the affiliate who referred applicant's
|
||||
AffiliateId *int `json:"affiliateId,omitempty" xmlrpc:"affiliateId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AgreementCompleteFlag *bool `json:"agreementCompleteFlag,omitempty" xmlrpc:"agreementCompleteFlag,omitempty"`
|
||||
|
||||
// Determines whether or not to also apply to the GEP program
|
||||
ApplyToGepFlag *bool `json:"applyToGepFlag,omitempty" xmlrpc:"applyToGepFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CardAccountNumber *string `json:"cardAccountNumber,omitempty" xmlrpc:"cardAccountNumber,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CardExpirationMonth *string `json:"cardExpirationMonth,omitempty" xmlrpc:"cardExpirationMonth,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CardExpirationYear *string `json:"cardExpirationYear,omitempty" xmlrpc:"cardExpirationYear,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CardType *string `json:"cardType,omitempty" xmlrpc:"cardType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CardVerificationNumber *string `json:"cardVerificationNumber,omitempty" xmlrpc:"cardVerificationNumber,omitempty"`
|
||||
|
||||
// Applicant's city
|
||||
City *string `json:"city,omitempty" xmlrpc:"city,omitempty"`
|
||||
|
||||
// Brief description of Startup's product and key differentiators
|
||||
CompanyDescription *string `json:"companyDescription,omitempty" xmlrpc:"companyDescription,omitempty"`
|
||||
|
||||
// Name of the applicant's company
|
||||
CompanyName *string `json:"companyName,omitempty" xmlrpc:"companyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyType *Catalyst_Company_Type `json:"companyType,omitempty" xmlrpc:"companyType,omitempty"`
|
||||
|
||||
// Id of the company type which best describes applicant's company
|
||||
CompanyTypeId *int `json:"companyTypeId,omitempty" xmlrpc:"companyTypeId,omitempty"`
|
||||
|
||||
// URL to the Startup's site
|
||||
CompanyUrl *string `json:"companyUrl,omitempty" xmlrpc:"companyUrl,omitempty"`
|
||||
|
||||
// Applicant's country code
|
||||
Country *string `json:"country,omitempty" xmlrpc:"country,omitempty"`
|
||||
|
||||
// Index of answer chosen for how many current users question
|
||||
CurrentUserChoice *int `json:"currentUserChoice,omitempty" xmlrpc:"currentUserChoice,omitempty"`
|
||||
|
||||
// Id of the fingerprint
|
||||
DeviceFingerprintId *string `json:"deviceFingerprintId,omitempty" xmlrpc:"deviceFingerprintId,omitempty"`
|
||||
|
||||
// Applicant's email address
|
||||
Email *string `json:"email,omitempty" xmlrpc:"email,omitempty"`
|
||||
|
||||
// Applicant's first name
|
||||
FirstName *string `json:"firstName,omitempty" xmlrpc:"firstName,omitempty"`
|
||||
|
||||
// Index of answer chosen for how many future users question
|
||||
FutureUserChoice *int `json:"futureUserChoice,omitempty" xmlrpc:"futureUserChoice,omitempty"`
|
||||
|
||||
// Name of accelerator or incubator startup belongs to, if any
|
||||
IncubatorName *string `json:"incubatorName,omitempty" xmlrpc:"incubatorName,omitempty"`
|
||||
|
||||
// Name of the investor, if any
|
||||
InvestorName *string `json:"investorName,omitempty" xmlrpc:"investorName,omitempty"`
|
||||
|
||||
// Applicant's last name
|
||||
LastName *string `json:"lastName,omitempty" xmlrpc:"lastName,omitempty"`
|
||||
|
||||
// Applicant's primary phone number
|
||||
OfficePhone *string `json:"officePhone,omitempty" xmlrpc:"officePhone,omitempty"`
|
||||
|
||||
// Whether or not the startup has been operating for more than five years
|
||||
OverFiveYearsOldFlag *bool `json:"overFiveYearsOldFlag,omitempty" xmlrpc:"overFiveYearsOldFlag,omitempty"`
|
||||
|
||||
// Applicant's postal code
|
||||
PostalCode *string `json:"postalCode,omitempty" xmlrpc:"postalCode,omitempty"`
|
||||
|
||||
// IBM referral code, if any
|
||||
ReferralCode *string `json:"referralCode,omitempty" xmlrpc:"referralCode,omitempty"`
|
||||
|
||||
// Whether or not the startup has over one million in annual revenue
|
||||
RevenueOverOneMillionFlag *bool `json:"revenueOverOneMillionFlag,omitempty" xmlrpc:"revenueOverOneMillionFlag,omitempty"`
|
||||
|
||||
// Determines whether or not to apply to the Catalyst program
|
||||
SkipCatalystApplicationFlag *bool `json:"skipCatalystApplicationFlag,omitempty" xmlrpc:"skipCatalystApplicationFlag,omitempty"`
|
||||
|
||||
// Applicant's state/region code
|
||||
State *string `json:"state,omitempty" xmlrpc:"state,omitempty"`
|
||||
|
||||
// Applicant's vatId, if one exists
|
||||
VatId *string `json:"vatId,omitempty" xmlrpc:"vatId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Enrollment_Request_Container_AnswerOption struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Answer *string `json:"answer,omitempty" xmlrpc:"answer,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Index *int `json:"index,omitempty" xmlrpc:"index,omitempty"`
|
||||
}
|
35
vendor/github.com/softlayer/softlayer-go/datatypes/compliance.go
generated
vendored
Normal file
35
vendor/github.com/softlayer/softlayer-go/datatypes/compliance.go
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Compliance_Report_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
547
vendor/github.com/softlayer/softlayer-go/datatypes/configuration.go
generated
vendored
Normal file
547
vendor/github.com/softlayer/softlayer-go/datatypes/configuration.go
generated
vendored
Normal file
|
@ -0,0 +1,547 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Configuration_Storage_Filesystem_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// Supported hardware raid modes
|
||||
type Configuration_Storage_Group_Array_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DriveMultiplier *int `json:"driveMultiplier,omitempty" xmlrpc:"driveMultiplier,omitempty"`
|
||||
|
||||
// A count of
|
||||
HardwareComponentModelCount *uint `json:"hardwareComponentModelCount,omitempty" xmlrpc:"hardwareComponentModelCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HardwareComponentModels []Hardware_Component_Model `json:"hardwareComponentModels,omitempty" xmlrpc:"hardwareComponentModels,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HotspareAllow *bool `json:"hotspareAllow,omitempty" xmlrpc:"hotspareAllow,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaximumDrives *int `json:"maximumDrives,omitempty" xmlrpc:"maximumDrives,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MinimumDrives *int `json:"minimumDrives,omitempty" xmlrpc:"minimumDrives,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// Single storage group(array) used for a hardware server order.
|
||||
//
|
||||
// If a raid configuration is required this object will describe a single array that will be configured on the server. If the server requires more than one array, a storage group will need to be created for each array.
|
||||
type Configuration_Storage_Group_Order struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ArrayNumber *int `json:"arrayNumber,omitempty" xmlrpc:"arrayNumber,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ArraySize *Float64 `json:"arraySize,omitempty" xmlrpc:"arraySize,omitempty"`
|
||||
|
||||
// Raid mode for the storage group.
|
||||
ArrayType *Configuration_Storage_Group_Array_Type `json:"arrayType,omitempty" xmlrpc:"arrayType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ArrayTypeId *int `json:"arrayTypeId,omitempty" xmlrpc:"arrayTypeId,omitempty"`
|
||||
|
||||
// The order item that relates to this storage group.
|
||||
BillingOrderItem *Billing_Order_Item `json:"billingOrderItem,omitempty" xmlrpc:"billingOrderItem,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
BillingOrderItemId *int `json:"billingOrderItemId,omitempty" xmlrpc:"billingOrderItemId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Controller *int `json:"controller,omitempty" xmlrpc:"controller,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HardDrives []int `json:"hardDrives,omitempty" xmlrpc:"hardDrives,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HotSpareDrives []int `json:"hotSpareDrives,omitempty" xmlrpc:"hotSpareDrives,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LvmFlag *bool `json:"lvmFlag,omitempty" xmlrpc:"lvmFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PartitionData *string `json:"partitionData,omitempty" xmlrpc:"partitionData,omitempty"`
|
||||
}
|
||||
|
||||
// Single storage group(array) used in a storage group template.
|
||||
//
|
||||
// If a server configuration requires a raid configuration this object will describe a single array to be configured.
|
||||
type Configuration_Storage_Group_Template_Group struct {
|
||||
Entity
|
||||
|
||||
// Flag to use all available space.
|
||||
Grow *bool `json:"grow,omitempty" xmlrpc:"grow,omitempty"`
|
||||
|
||||
// Comma delimited integers of drive indexes for the array. This can also be the string 'all' to specify all drives in the server
|
||||
HardDrivesString *string `json:"hardDrivesString,omitempty" xmlrpc:"hardDrivesString,omitempty"`
|
||||
|
||||
// The order of the arrays in the template.
|
||||
OrderIndex *int `json:"orderIndex,omitempty" xmlrpc:"orderIndex,omitempty"`
|
||||
|
||||
// Size of array. Must be within limitations of the smallest drive and raid mode
|
||||
Size *Float64 `json:"size,omitempty" xmlrpc:"size,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Type *Configuration_Storage_Group_Array_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template data type contains general information of an arbitrary resource.
|
||||
type Configuration_Template struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// Internal identifier of a SoftLayer account that this configuration template belongs to
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// A count of
|
||||
ConfigurationSectionCount *uint `json:"configurationSectionCount,omitempty" xmlrpc:"configurationSectionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationSections []Configuration_Template_Section `json:"configurationSections,omitempty" xmlrpc:"configurationSections,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationTemplateReference []Monitoring_Agent_Configuration_Template_Group_Reference `json:"configurationTemplateReference,omitempty" xmlrpc:"configurationTemplateReference,omitempty"`
|
||||
|
||||
// A count of
|
||||
ConfigurationTemplateReferenceCount *uint `json:"configurationTemplateReferenceCount,omitempty" xmlrpc:"configurationTemplateReferenceCount,omitempty"`
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A count of
|
||||
DefaultValueCount *uint `json:"defaultValueCount,omitempty" xmlrpc:"defaultValueCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DefaultValues []Configuration_Template_Section_Definition_Value `json:"defaultValues,omitempty" xmlrpc:"defaultValues,omitempty"`
|
||||
|
||||
// A count of
|
||||
DefinitionCount *uint `json:"definitionCount,omitempty" xmlrpc:"definitionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Definitions []Configuration_Template_Section_Definition `json:"definitions,omitempty" xmlrpc:"definitions,omitempty"`
|
||||
|
||||
// Configuration template description
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Item *Product_Item `json:"item,omitempty" xmlrpc:"item,omitempty"`
|
||||
|
||||
// Internal identifier of a product item that this configuration template is associated with
|
||||
ItemId *int `json:"itemId,omitempty" xmlrpc:"itemId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkedSectionReferences *Configuration_Template_Section_Reference `json:"linkedSectionReferences,omitempty" xmlrpc:"linkedSectionReferences,omitempty"`
|
||||
|
||||
// Last modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// Configuration template name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Parent *Configuration_Template `json:"parent,omitempty" xmlrpc:"parent,omitempty"`
|
||||
|
||||
// Internal identifier of the parent configuration template
|
||||
ParentId *int `json:"parentId,omitempty" xmlrpc:"parentId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
User *User_Customer `json:"user,omitempty" xmlrpc:"user,omitempty"`
|
||||
|
||||
// Internal identifier of a user that last modified this configuration template
|
||||
UserRecordId *int `json:"userRecordId,omitempty" xmlrpc:"userRecordId,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration template attribute class contains supplementary information for a configuration template.
|
||||
type Configuration_Template_Attribute struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationTemplate *Configuration_Template `json:"configurationTemplate,omitempty" xmlrpc:"configurationTemplate,omitempty"`
|
||||
|
||||
// Value of a configuration template attribute
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section data type contains information of a configuration section.
|
||||
//
|
||||
// Configuration can contain sub-sections.
|
||||
type Configuration_Template_Section struct {
|
||||
Entity
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A count of
|
||||
DefinitionCount *uint `json:"definitionCount,omitempty" xmlrpc:"definitionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Definitions []Configuration_Template_Section_Definition `json:"definitions,omitempty" xmlrpc:"definitions,omitempty"`
|
||||
|
||||
// Configuration section description
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DisallowedDeletionFlag *bool `json:"disallowedDeletionFlag,omitempty" xmlrpc:"disallowedDeletionFlag,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkedTemplate *Configuration_Template `json:"linkedTemplate,omitempty" xmlrpc:"linkedTemplate,omitempty"`
|
||||
|
||||
// Internal identifier of a sub configuration template that this section points to. Use this property if you wish to create a reference to a sub configuration template when creating a linked section.
|
||||
LinkedTemplateId *string `json:"linkedTemplateId,omitempty" xmlrpc:"linkedTemplateId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkedTemplateReference *Configuration_Template_Section_Reference `json:"linkedTemplateReference,omitempty" xmlrpc:"linkedTemplateReference,omitempty"`
|
||||
|
||||
// Last modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// Configuration section name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// Internal identifier of the parent configuration section
|
||||
ParentId *int `json:"parentId,omitempty" xmlrpc:"parentId,omitempty"`
|
||||
|
||||
// A count of
|
||||
ProfileCount *uint `json:"profileCount,omitempty" xmlrpc:"profileCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Profiles []Configuration_Template_Section_Profile `json:"profiles,omitempty" xmlrpc:"profiles,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SectionType *Configuration_Template_Section_Type `json:"sectionType,omitempty" xmlrpc:"sectionType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SectionTypeName *string `json:"sectionTypeName,omitempty" xmlrpc:"sectionTypeName,omitempty"`
|
||||
|
||||
// Sort order
|
||||
Sort *int `json:"sort,omitempty" xmlrpc:"sort,omitempty"`
|
||||
|
||||
// A count of
|
||||
SubSectionCount *uint `json:"subSectionCount,omitempty" xmlrpc:"subSectionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SubSections []Configuration_Template_Section `json:"subSections,omitempty" xmlrpc:"subSections,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Template *Configuration_Template `json:"template,omitempty" xmlrpc:"template,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template that this section belongs to
|
||||
TemplateId *string `json:"templateId,omitempty" xmlrpc:"templateId,omitempty"`
|
||||
|
||||
// Internal identifier of the configuration section type
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration section attribute class contains supplementary information for a configuration section.
|
||||
type Configuration_Template_Section_Attribute struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationSection *Configuration_Template_Section `json:"configurationSection,omitempty" xmlrpc:"configurationSection,omitempty"`
|
||||
|
||||
// Value of a configuration section attribute
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration definition gives you details of the value that you're setting.
|
||||
//
|
||||
// Some monitoring agents requires values unique to your system. If value type is defined as "Resource Specific Values", you will have to make an additional API call to retrieve your system specific values.
|
||||
//
|
||||
// See [[SoftLayer_Monitoring_Agent::getAvailableConfigurationValues|Monitoring Agent]] service to retrieve your system specific values.
|
||||
type Configuration_Template_Section_Definition struct {
|
||||
Entity
|
||||
|
||||
// A count of
|
||||
AttributeCount *uint `json:"attributeCount,omitempty" xmlrpc:"attributeCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Attributes []Configuration_Template_Section_Definition_Attribute `json:"attributes,omitempty" xmlrpc:"attributes,omitempty"`
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DefaultValue *Configuration_Template_Section_Definition_Value `json:"defaultValue,omitempty" xmlrpc:"defaultValue,omitempty"`
|
||||
|
||||
// Description of a configuration definition.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Enumeration values separated by comma.
|
||||
EnumerationValues *string `json:"enumerationValues,omitempty" xmlrpc:"enumerationValues,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Group *Configuration_Template_Section_Definition_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// Definition group id.
|
||||
GroupId *string `json:"groupId,omitempty" xmlrpc:"groupId,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration definition.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Maximum value of a configuration definition.
|
||||
MaximumValue *string `json:"maximumValue,omitempty" xmlrpc:"maximumValue,omitempty"`
|
||||
|
||||
// Minimum value of a configuration definition.
|
||||
MinimumValue *string `json:"minimumValue,omitempty" xmlrpc:"minimumValue,omitempty"`
|
||||
|
||||
// Last modify date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MonitoringDataFlag *bool `json:"monitoringDataFlag,omitempty" xmlrpc:"monitoringDataFlag,omitempty"`
|
||||
|
||||
// Configuration definition name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// Definition path.
|
||||
Path *string `json:"path,omitempty" xmlrpc:"path,omitempty"`
|
||||
|
||||
// Indicates if a configuration value is required for this definition.
|
||||
RequireValueFlag *int `json:"requireValueFlag,omitempty" xmlrpc:"requireValueFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Section *Configuration_Template_Section `json:"section,omitempty" xmlrpc:"section,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section.
|
||||
SectionId *int `json:"sectionId,omitempty" xmlrpc:"sectionId,omitempty"`
|
||||
|
||||
// Shortened configuration definition name.
|
||||
ShortName *string `json:"shortName,omitempty" xmlrpc:"shortName,omitempty"`
|
||||
|
||||
// Sort order
|
||||
Sort *int `json:"sort,omitempty" xmlrpc:"sort,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration definition type.
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ValueType *Configuration_Template_Section_Definition_Type `json:"valueType,omitempty" xmlrpc:"valueType,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration definition attribute class contains supplementary information for a configuration definition.
|
||||
type Configuration_Template_Section_Definition_Attribute struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AttributeType *Configuration_Template_Section_Definition_Attribute_Type `json:"attributeType,omitempty" xmlrpc:"attributeType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationDefinition *Configuration_Template_Section_Definition `json:"configurationDefinition,omitempty" xmlrpc:"configurationDefinition,omitempty"`
|
||||
|
||||
// Value of a configuration definition attribute
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Configuration_Template_Attribute_Type models the type of attribute that can be assigned to a configuration definition.
|
||||
type Configuration_Template_Section_Definition_Attribute_Type struct {
|
||||
Entity
|
||||
|
||||
// Description of a definition attribute type
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Name of a definition attribute type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration definition group gives you details of the definition and allows extra functionality.
|
||||
//
|
||||
//
|
||||
type Configuration_Template_Section_Definition_Group struct {
|
||||
Entity
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Internal Description of a definition group.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a definition group.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Internal Definition group name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Parent *Configuration_Template_Section_Definition_Group `json:"parent,omitempty" xmlrpc:"parent,omitempty"`
|
||||
|
||||
// Sort order
|
||||
SortOrder *int `json:"sortOrder,omitempty" xmlrpc:"sortOrder,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Configuration_Template_Section_Definition_Type further defines the value of a configuration definition.
|
||||
type Configuration_Template_Section_Definition_Type struct {
|
||||
Entity
|
||||
|
||||
// Description of a configuration value type
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration value type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name of a configuration value type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Configuration_Section_Value is used to set the value for a configuration definition
|
||||
type Configuration_Template_Section_Definition_Value struct {
|
||||
Entity
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Definition *Configuration_Template_Section_Definition `json:"definition,omitempty" xmlrpc:"definition,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration definition that this configuration value if defined by
|
||||
DefinitionId *int `json:"definitionId,omitempty" xmlrpc:"definitionId,omitempty"`
|
||||
|
||||
// Internal Last modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Template *Configuration_Template `json:"template,omitempty" xmlrpc:"template,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template that this configuration value belongs to
|
||||
TemplateId *int `json:"templateId,omitempty" xmlrpc:"templateId,omitempty"`
|
||||
|
||||
// Internal Configuration value
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Some configuration templates let you create a unique configuration profiles.
|
||||
//
|
||||
// For example, you can create multiple configuration profiles to monitor multiple hard drives with "CPU/Memory/Disk Monitoring Agent". SoftLayer_Configuration_Template_Section_Profile help you keep track of custom configuration profiles.
|
||||
type Configuration_Template_Section_Profile struct {
|
||||
Entity
|
||||
|
||||
// Internal identifier of a monitoring agent this profile belongs to.
|
||||
AgentId *int `json:"agentId,omitempty" xmlrpc:"agentId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationSection *Configuration_Template_Section `json:"configurationSection,omitempty" xmlrpc:"configurationSection,omitempty"`
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration profile.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MonitoringAgent *Monitoring_Agent `json:"monitoringAgent,omitempty" xmlrpc:"monitoringAgent,omitempty"`
|
||||
|
||||
// Name of a configuration profile
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section that this profile belongs to.
|
||||
SectionId *int `json:"sectionId,omitempty" xmlrpc:"sectionId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section_Reference data type contains information of a configuration section and its associated configuration template.
|
||||
type Configuration_Template_Section_Reference struct {
|
||||
Entity
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section reference.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Section *Configuration_Template_Section `json:"section,omitempty" xmlrpc:"section,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section.
|
||||
SectionId *int `json:"sectionId,omitempty" xmlrpc:"sectionId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Template *Configuration_Template `json:"template,omitempty" xmlrpc:"template,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template.
|
||||
TemplateId *int `json:"templateId,omitempty" xmlrpc:"templateId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section_Type data type contains information of a configuration section type.
|
||||
//
|
||||
// Configuration can contain sub-sections.
|
||||
type Configuration_Template_Section_Type struct {
|
||||
Entity
|
||||
|
||||
// Configuration section type description
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration section type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Configuration section type name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Type data type contains configuration template type information.
|
||||
type Configuration_Template_Type struct {
|
||||
Entity
|
||||
|
||||
// Created date. This is deprecated now.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Description of a configuration template
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name of a configuration template type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
4728
vendor/github.com/softlayer/softlayer-go/datatypes/container.go
generated
vendored
Normal file
4728
vendor/github.com/softlayer/softlayer-go/datatypes/container.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
430
vendor/github.com/softlayer/softlayer-go/datatypes/dns.go
generated
vendored
Normal file
430
vendor/github.com/softlayer/softlayer-go/datatypes/dns.go
generated
vendored
Normal file
|
@ -0,0 +1,430 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Dns_Domain data type represents a single DNS domain record hosted on the SoftLayer nameservers. Domains contain general information about the domain name such as name and serial. Individual records such as A, AAAA, CTYPE, and MX records are stored in the domain's associated [[SoftLayer_Dns_Domain_ResourceRecord (type)|SoftLayer_Dns_Domain_ResourceRecord]] records.
|
||||
type Dns_Domain struct {
|
||||
Entity
|
||||
|
||||
// The SoftLayer customer account that owns a domain.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// A domain record's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A flag indicating that the dns domain record is a managed resource.
|
||||
ManagedResourceFlag *bool `json:"managedResourceFlag,omitempty" xmlrpc:"managedResourceFlag,omitempty"`
|
||||
|
||||
// A domain's name including top-level domain, for example "example.com".
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of the individual records contained within a domain record. These include but are not limited to A, AAAA, MX, CTYPE, SPF and TXT records.
|
||||
ResourceRecordCount *uint `json:"resourceRecordCount,omitempty" xmlrpc:"resourceRecordCount,omitempty"`
|
||||
|
||||
// The individual records contained within a domain record. These include but are not limited to A, AAAA, MX, CTYPE, SPF and TXT records.
|
||||
ResourceRecords []Dns_Domain_ResourceRecord `json:"resourceRecords" xmlrpc:"resourceRecords"`
|
||||
|
||||
// The secondary DNS record that defines this domain as being managed through zone transfers.
|
||||
Secondary *Dns_Secondary `json:"secondary,omitempty" xmlrpc:"secondary,omitempty"`
|
||||
|
||||
// A unique number denoting the latest revision of a domain. Whenever a domain is changed its corresponding serial number is also changed. Serial numbers typically follow the format yyyymmdd## where yyyy is the current year, mm is the current month, dd is the current day of the month, and ## is the number of the revision for that day. A domain's serial number is automatically updated when edited via the API.
|
||||
Serial *int `json:"serial,omitempty" xmlrpc:"serial,omitempty"`
|
||||
|
||||
// The start of authority (SOA) record contains authoritative and propagation details for a DNS zone. This property is not considered in requests to createObject and editObject.
|
||||
SoaResourceRecord *Dns_Domain_ResourceRecord_SoaType `json:"soaResourceRecord,omitempty" xmlrpc:"soaResourceRecord,omitempty"`
|
||||
|
||||
// The date that this domain record was last updated.
|
||||
UpdateDate *Time `json:"updateDate,omitempty" xmlrpc:"updateDate,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_Forward data type represents a single DNS domain record hosted on the SoftLayer nameservers. Domains contain general information about the domain name such as name and serial. Individual records such as A, AAAA, CTYPE, and MX records are stored in the domain's associated [[SoftLayer_Dns_Domain_ResourceRecord (type)|SoftLayer_Dns_Domain_ResourceRecord]] records.
|
||||
type Dns_Domain_Forward struct {
|
||||
Dns_Domain
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_Registration data type represents a domain registration record.
|
||||
type Dns_Domain_Registration struct {
|
||||
Entity
|
||||
|
||||
// The SoftLayer customer account that the domain is registered to.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The domain registration status.
|
||||
DomainRegistrationStatus *Dns_Domain_Registration_Status `json:"domainRegistrationStatus,omitempty" xmlrpc:"domainRegistrationStatus,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DomainRegistrationStatusId *int `json:"domainRegistrationStatusId,omitempty" xmlrpc:"domainRegistrationStatusId,omitempty"`
|
||||
|
||||
// The date that the domain registration will expire.
|
||||
ExpireDate *Time `json:"expireDate,omitempty" xmlrpc:"expireDate,omitempty"`
|
||||
|
||||
// A domain record's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Indicates whether a domain is locked or unlocked.
|
||||
LockedFlag *int `json:"lockedFlag,omitempty" xmlrpc:"lockedFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// A domain's name, for example "example.com".
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The registrant verification status.
|
||||
RegistrantVerificationStatus *Dns_Domain_Registration_Registrant_Verification_Status `json:"registrantVerificationStatus,omitempty" xmlrpc:"registrantVerificationStatus,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RegistrantVerificationStatusId *int `json:"registrantVerificationStatusId,omitempty" xmlrpc:"registrantVerificationStatusId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ServiceProvider *Service_Provider `json:"serviceProvider,omitempty" xmlrpc:"serviceProvider,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ServiceProviderId *int `json:"serviceProviderId,omitempty" xmlrpc:"serviceProviderId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_Registration_Registrant_Verification_Status models the state of the registrant. Here are the following status codes:
|
||||
//
|
||||
//
|
||||
// *'''Admin Reviewing''': The registrant data has been submitted and being reviewed by compliance team.
|
||||
// *'''Pending''': The verification process has been inititated, and verification email will be sent.
|
||||
// *'''Suspended''': The registrant has failed verification and the domain has been suspended.
|
||||
// *'''Verified''': The registrant has been validated.
|
||||
// *'''Verifying''': The verification process has been initiated and is waiting for registrant response.
|
||||
// *'''Unverified''': The verification process has not been inititated.
|
||||
//
|
||||
//
|
||||
type Dns_Domain_Registration_Registrant_Verification_Status struct {
|
||||
Entity
|
||||
|
||||
// The description of the registrant verification status.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// The unique identifier of the registrant verification status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique keyname of the registrant verification status.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// The name of the registrant verification status.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_Registration_Status models the state of domain name. Here are the following status codes:
|
||||
//
|
||||
//
|
||||
// *'''Active''': This domain name is active.
|
||||
// *'''Pending Owner Approval''': Pending owner approval for completion of transfer.
|
||||
// *'''Pending Admin Review''': Pending admin review for transfer.
|
||||
// *'''Pending Registry''': Pending registry for transfer.
|
||||
// *'''Expired''': Domain name has expired.
|
||||
//
|
||||
//
|
||||
type Dns_Domain_Registration_Status struct {
|
||||
Entity
|
||||
|
||||
// The description of the domain registration status names.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// The unique identifier of the domain registration status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique keyname of the domain registration status.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// The name of the domain registration status.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_ResourceRecord data type represents a single resource record entry in a SoftLayer hosted domain. Each resource record contains a ''host'' and ''data'' property, defining a resource's name and it's target data. Domains contain multiple types of resource records. The ''type'' property separates out resource records by type. ''Type'' can take one of the following values:
|
||||
// * '''"a"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AType|address]] records
|
||||
// * '''"aaaa"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AaaaType|address]] records
|
||||
// * '''"cname"''' for [[SoftLayer_Dns_Domain_ResourceRecord_CnameType|canonical name]] records
|
||||
// * '''"mx"''' for [[SoftLayer_Dns_Domain_ResourceRecord_MxType|mail exchanger]] records
|
||||
// * '''"ns"''' for [[SoftLayer_Dns_Domain_ResourceRecord_NsType|name server]] records
|
||||
// * '''"ptr"''' for [[SoftLayer_Dns_Domain_ResourceRecord_PtrType|pointer]] records in reverse domains
|
||||
// * '''"soa"''' for a domain's [[SoftLayer_Dns_Domain_ResourceRecord_SoaType|start of authority]] record
|
||||
// * '''"spf"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SpfType|sender policy framework]] records
|
||||
// * '''"srv"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SrvType|service]] records
|
||||
// * '''"txt"''' for [[SoftLayer_Dns_Domain_ResourceRecord_TxtType|text]] records
|
||||
//
|
||||
//
|
||||
// As ''SoftLayer_Dns_Domain_ResourceRecord'' objects are created and loaded, the API verifies the ''type'' property and casts the object as the appropriate type.
|
||||
type Dns_Domain_ResourceRecord struct {
|
||||
Entity
|
||||
|
||||
// The value of a domain's resource record. This can be an IP address or a hostname. Fully qualified host and domain name data must end with the "." character.
|
||||
Data *string `json:"data,omitempty" xmlrpc:"data,omitempty"`
|
||||
|
||||
// The domain that a resource record belongs to.
|
||||
Domain *Dns_Domain `json:"domain,omitempty" xmlrpc:"domain,omitempty"`
|
||||
|
||||
// An identifier belonging to the domain that a resource record is associated with.
|
||||
DomainId *int `json:"domainId,omitempty" xmlrpc:"domainId,omitempty"`
|
||||
|
||||
// The amount of time in seconds that a secondary name server (or servers) will hold a zone before it is no longer considered authoritative.
|
||||
Expire *int `json:"expire,omitempty" xmlrpc:"expire,omitempty"`
|
||||
|
||||
// The host defined by a resource record. A value of "@" denotes a wildcard.
|
||||
Host *string `json:"host,omitempty" xmlrpc:"host,omitempty"`
|
||||
|
||||
// A domain resource record's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Whether the address associated with a PTR record is the gateway address of a subnet.
|
||||
IsGatewayAddress *bool `json:"isGatewayAddress,omitempty" xmlrpc:"isGatewayAddress,omitempty"`
|
||||
|
||||
// The amount of time in seconds that a domain's resource records are valid. This is also known as a minimum TTL, and can be overridden by an individual resource record's TTL.
|
||||
Minimum *int `json:"minimum,omitempty" xmlrpc:"minimum,omitempty"`
|
||||
|
||||
// Useful in cases where a domain has more than one mail exchanger, the priority property is the priority of the MTA that delivers mail for a domain. A lower number denotes a higher priority, and mail will attempt to deliver through that MTA before moving to lower priority mail servers. Priority is defaulted to 10 upon resource record creation.
|
||||
MxPriority *int `json:"mxPriority,omitempty" xmlrpc:"mxPriority,omitempty"`
|
||||
|
||||
// The TCP or UDP port on which the service is to be found.
|
||||
Port *int `json:"port,omitempty" xmlrpc:"port,omitempty"`
|
||||
|
||||
// The priority of the target host, lower value means more preferred.
|
||||
Priority *int `json:"priority,omitempty" xmlrpc:"priority,omitempty"`
|
||||
|
||||
// The protocol of the desired service; this is usually either TCP or UDP.
|
||||
Protocol *string `json:"protocol,omitempty" xmlrpc:"protocol,omitempty"`
|
||||
|
||||
// The amount of time in seconds that a secondary name server should wait to check for a new copy of a DNS zone from the domain's primary name server. If a zone file has changed then the secondary DNS server will update it's copy of the zone to match the primary DNS server's zone.
|
||||
Refresh *int `json:"refresh,omitempty" xmlrpc:"refresh,omitempty"`
|
||||
|
||||
// The email address of the person responsible for a domain, with the "@" replaced with a ".". For instance, if root@example.org is responsible for example.org, then example.org's SOA responsibility is "root.example.org.".
|
||||
ResponsiblePerson *string `json:"responsiblePerson,omitempty" xmlrpc:"responsiblePerson,omitempty"`
|
||||
|
||||
// The amount of time in seconds that a domain's primary name server (or servers) should wait if an attempt to refresh by a secondary name server failed before attempting to refresh a domain's zone with that secondary name server again.
|
||||
Retry *int `json:"retry,omitempty" xmlrpc:"retry,omitempty"`
|
||||
|
||||
// The symbolic name of the desired service
|
||||
Service *string `json:"service,omitempty" xmlrpc:"service,omitempty"`
|
||||
|
||||
// The Time To Live value of a resource record, measured in seconds. TTL is used by a name server to determine how long to cache a resource record. An SOA record's TTL value defines the domain's overall TTL.
|
||||
Ttl *int `json:"ttl,omitempty" xmlrpc:"ttl,omitempty"`
|
||||
|
||||
// A domain resource record's type. A value of "a" denotes an A (address) record, "aaaa" denotes an AAAA (IPv6 address) record, "cname" denotes a CNAME (canonical name) record, "mx" denotes an MX (mail exchanger) record, "ns" denotes an NS (nameserver) record, "ptr" denotes a PTR (pointer/reverse) record, "soa" denotes the SOA (start of authority) record, "spf" denotes a SPF (sender policy framework) record, and "txt" denotes a TXT (text) record. A domain record's type also denotes which class in the SoftLayer API is a best match for extending a resource record.
|
||||
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// A relative weight for records with the same priority.
|
||||
Weight *int `json:"weight,omitempty" xmlrpc:"weight,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_AType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "a" and defines a DNS A record on a SoftLayer hosted domain. An A record directs a host name to an IP address. For instance if the A record for "host.example.org" points to the IP address 10.0.0.1 then the ''host'' property for the A record equals "host" and the ''data'' property equals "10.0.0.1".
|
||||
type Dns_Domain_ResourceRecord_AType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_AaaaType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "aaaa" and defines a DNS AAAA record on a SoftLayer hosted domain. An AAAA record directs a host name to an IPv6 address. For instance if the AAAA record for "host.example.org" points to the IPv6 address "fe80:0:0:0:0:0:a00:0" then the ''host'' property for the AAAA record equals "host" and the ''data'' property equals "fe80:0:0:0:0:0:a00:0".
|
||||
type Dns_Domain_ResourceRecord_AaaaType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_CnameType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "cname" and defines a DNS CNAME record on a SoftLayer hosted domain. A CNAME record directs a host name to another host. For instance, if the CNAME record for "alias.example.org" points to the host "host.example.org" then the ''host'' property equals "alias" and the ''data'' property equals "host.example.org.".
|
||||
//
|
||||
// DNS entries defined by CNAME should not be used as the data field for an MX record.
|
||||
type Dns_Domain_ResourceRecord_CnameType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_MxType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "mx" and used to describe MX resource records. MX records control which hosts are responsible as mail exchangers for a domain. For instance, in the domain example.org, an MX record whose host is "@" and data is "mail" says that the host "mail.example.org" is responsible for handling mail for example.org. That means mail sent to users @example.org are delivered to mail.example.org.
|
||||
//
|
||||
// Domains can have more than one MX record if it uses more than one server to send mail through. Multiple MX records are denoted by their priority, defined by the mxPriority property.
|
||||
//
|
||||
// MX records must be defined for hosts with accompanying A or AAAA resource records. They may not point mail towards a host defined by a CNAME record.
|
||||
type Dns_Domain_ResourceRecord_MxType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_NsType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "ns" and defines a DNS NS record on a SoftLayer hosted domain. An NS record defines the authoritative name server for a domain. All SoftLayer hosted domains contain NS records for "ns1.softlayer.com" and "ns2.softlayer.com" . For instance, if example.org is hosted on ns1.softlayer.com, then example.org contains an NS record whose ''host'' property equals "@" and whose ''data'' property equals "ns1.example.org".
|
||||
//
|
||||
// NS resource records pointing to ns1.softlayer.com or ns2.softlayer.com many not be removed from a SoftLayer hosted domain.
|
||||
type Dns_Domain_ResourceRecord_NsType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_PtrType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "ptr" and defines a reverse DNS PTR record on the SoftLayer name servers.
|
||||
//
|
||||
// The format for a reverse DNS PTR record varies based on whether it is for an IPv4 or IPv6 address.
|
||||
//
|
||||
// For an IPv4 address the ''host'' property for every PTR record is the last octet of the IP address that the PTR record belongs to, while the ''data'' property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first three octets of an IP address in reverse order followed by ".in-addr.arpa".
|
||||
//
|
||||
// For instance, if the reverse DNS record for 10.0.0.1 is "host.example.org" then it's corresponding SoftLayer_Dns_Domain_ResourceRecord_PtrType host is "1", while it's data property equals "host.example.org". The full name of the reverse record for host.example.org including the domain name is "1.0.0.10.in-addr.arpa".
|
||||
//
|
||||
// For an IPv6 address the ''host'' property for every PTR record is the last four octets of the IP address that the PTR record belongs to. The last four octets need to be in reversed order and each digit separated by a period. The ''data'' property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first four octets of an IP address in reverse order, split up by digit with a period, and followed by ".ip6.arpa".
|
||||
//
|
||||
// For instance, if the reverse DNS record for fe80:0000:0000:0000:0000:0000:0a00:0001 is "host.example.org" then it's corresponding SoftLayer_Dns_Domain_ResourceRecord_PtrType host is "1.0.0.0.0.0.a.0.0.0.0.0.0.0.0.0", while it's data property equals "host.example.org". The full name of the reverse record for host.example.org including the domain name is "1.0.0.0.0.0.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa".
|
||||
//
|
||||
// PTR record host names may not be changed by [[SoftLayer_Dns_Domain_ResourceRecord::editObject]] or [[SoftLayer_Dns_Domain_ResourceRecord::editObjects]].
|
||||
type Dns_Domain_ResourceRecord_PtrType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
|
||||
// Whether the address associated with a PTR record is the gateway address of a subnet.
|
||||
IsGatewayAddress *bool `json:"isGatewayAddress,omitempty" xmlrpc:"isGatewayAddress,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_SoaType defines a domains' Start of Authority (or SOA) resource record. A domain's SOA record contains a domain's general and propagation information. Every domain must have one SOA record, and it is not possible to remove a domain's SOA record.
|
||||
//
|
||||
// SOA records typically contain a domain's serial number, but the SoftLayer API associates a domain's serial number directly with it's SoftLayer_Dns_Domain record.
|
||||
type Dns_Domain_ResourceRecord_SoaType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_SpfType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "spf" and defines a DNS SPF record on a SoftLayer hosted domain. An SPF record provides sender policy framework data for a host. For instance, if defining the SPF record "v=spf1 mx:mail.example.org ~all" for "host.example.org". then the ''host'' property equals "host" and the ''data'' property equals "v=spf1 mx:mail.example.org ~all".
|
||||
//
|
||||
// SPF records are commonly used in email verification methods such as Sender Policy Framework.
|
||||
type Dns_Domain_ResourceRecord_SpfType struct {
|
||||
Dns_Domain_ResourceRecord_TxtType
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_SrvType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "srv" and defines a DNS SRV record on a SoftLayer hosted domain.
|
||||
type Dns_Domain_ResourceRecord_SrvType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
|
||||
// The TCP or UDP port on which the service is to be found.
|
||||
Port *int `json:"port,omitempty" xmlrpc:"port,omitempty"`
|
||||
|
||||
// The priority of the target host, lower value means more preferred.
|
||||
Priority *int `json:"priority,omitempty" xmlrpc:"priority,omitempty"`
|
||||
|
||||
// The protocol of the desired service; this is usually either TCP or UDP.
|
||||
Protocol *string `json:"protocol,omitempty" xmlrpc:"protocol,omitempty"`
|
||||
|
||||
// The symbolic name of the desired service
|
||||
Service *string `json:"service,omitempty" xmlrpc:"service,omitempty"`
|
||||
|
||||
// A relative weight for records with the same priority.
|
||||
Weight *int `json:"weight,omitempty" xmlrpc:"weight,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Dns_Domain_ResourceRecord_TxtType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "txt" and defines a DNS TXT record on a SoftLayer hosted domain. A TXT record provides a text description for a host. For instance, if defining the TXT record "My test host" for "host.example.org". then the ''host'' property equals "host" and the ''data'' property equals "My test host".
|
||||
//
|
||||
// TXT records are commonly used in email verification methods such as Sender Policy Framework.
|
||||
type Dns_Domain_ResourceRecord_TxtType struct {
|
||||
Dns_Domain_ResourceRecord
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_Reverse data type represents a reverse IP address record.
|
||||
type Dns_Domain_Reverse struct {
|
||||
Dns_Domain
|
||||
|
||||
// Network address the domain is associated with.
|
||||
NetworkAddress *string `json:"networkAddress,omitempty" xmlrpc:"networkAddress,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_Reverse_Version4 data type represents a reverse IPv4 address record.
|
||||
type Dns_Domain_Reverse_Version4 struct {
|
||||
Dns_Domain_Reverse
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Domain_Reverse_Version6 data type represents a reverse IPv6 address record.
|
||||
type Dns_Domain_Reverse_Version6 struct {
|
||||
Dns_Domain_Reverse
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Message data type contains information for a single message generated by the SoftLayer DNS system. SoftLayer_Dns_Messages are typically created during the secondary DNS transfer process.
|
||||
type Dns_Message struct {
|
||||
Entity
|
||||
|
||||
// The date the message was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The domain that is associated with a message.
|
||||
Domain *Dns_Domain `json:"domain,omitempty" xmlrpc:"domain,omitempty"`
|
||||
|
||||
// The internal identifier for a DNS message.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The message text.
|
||||
Message *string `json:"message,omitempty" xmlrpc:"message,omitempty"`
|
||||
|
||||
// The priority level for a DNS message. The possible levels are 'notice' and 'error'.
|
||||
Priority *string `json:"priority,omitempty" xmlrpc:"priority,omitempty"`
|
||||
|
||||
// The resource record that is associated with a message.
|
||||
ResourceRecord *Dns_Domain_ResourceRecord `json:"resourceRecord,omitempty" xmlrpc:"resourceRecord,omitempty"`
|
||||
|
||||
// The secondary DNS record that a message belongs to.
|
||||
Secondary *Dns_Secondary `json:"secondary,omitempty" xmlrpc:"secondary,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Secondary data type contains information on a single secondary DNS zone which is managed through SoftLayer's zone transfer service. Domains created via zone transfer may not be modified by the SoftLayer portal or API.
|
||||
type Dns_Secondary struct {
|
||||
Entity
|
||||
|
||||
// The SoftLayer account that owns a secondary DNS record.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The date a secondary DNS record was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The domain record created by zone transfer from a secondary DNS record.
|
||||
Domain *Dns_Domain `json:"domain,omitempty" xmlrpc:"domain,omitempty"`
|
||||
|
||||
// A count of the error messages created during secondary DNS record transfer.
|
||||
ErrorMessageCount *uint `json:"errorMessageCount,omitempty" xmlrpc:"errorMessageCount,omitempty"`
|
||||
|
||||
// The error messages created during secondary DNS record transfer.
|
||||
ErrorMessages []Dns_Message `json:"errorMessages,omitempty" xmlrpc:"errorMessages,omitempty"`
|
||||
|
||||
// The internal identifier for a secondary DNS record.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The date when the most recent secondary DNS zone transfer took place.
|
||||
LastUpdate *Time `json:"lastUpdate,omitempty" xmlrpc:"lastUpdate,omitempty"`
|
||||
|
||||
// The IP address of the master name server where a secondary DNS zone is transferred from.
|
||||
MasterIpAddress *string `json:"masterIpAddress,omitempty" xmlrpc:"masterIpAddress,omitempty"`
|
||||
|
||||
// The current status of the secondary DNS zone.
|
||||
Status *Dns_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// The current status of a secondary DNS record. The status may be one of the following:
|
||||
// :*'''0''': Disabled
|
||||
// :*'''1''': Active
|
||||
// :*'''2''': Transfer Now
|
||||
// :*'''3''': An error occurred that prevented the zone transfer from being completed.
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// The textual representation of a secondary DNS zone's status.
|
||||
StatusText *string `json:"statusText,omitempty" xmlrpc:"statusText,omitempty"`
|
||||
|
||||
// How often a secondary DNS zone should be transferred in minutes.
|
||||
TransferFrequency *int `json:"transferFrequency,omitempty" xmlrpc:"transferFrequency,omitempty"`
|
||||
|
||||
// The name of the zone that is transferred.
|
||||
ZoneName *string `json:"zoneName,omitempty" xmlrpc:"zoneName,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Dns_Status data type contains information for a DNS status
|
||||
type Dns_Status struct {
|
||||
Entity
|
||||
|
||||
// Internal identifier of a DNS status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Monitoring DNS status name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
25
vendor/github.com/softlayer/softlayer-go/datatypes/entity.go
generated
vendored
Normal file
25
vendor/github.com/softlayer/softlayer-go/datatypes/entity.go
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Entity struct {
|
||||
}
|
71
vendor/github.com/softlayer/softlayer-go/datatypes/event.go
generated
vendored
Normal file
71
vendor/github.com/softlayer/softlayer-go/datatypes/event.go
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Event_Log data type contains an event detail occurred upon various SoftLayer resources.
|
||||
type Event_Log struct {
|
||||
Entity
|
||||
|
||||
// Account id with which the event is associated
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// Event creation date in millisecond precision
|
||||
EventCreateDate *Time `json:"eventCreateDate,omitempty" xmlrpc:"eventCreateDate,omitempty"`
|
||||
|
||||
// Event name such as "reboot", "cancel", "update host" and so on.
|
||||
EventName *string `json:"eventName,omitempty" xmlrpc:"eventName,omitempty"`
|
||||
|
||||
// The remote IP Address that made the request
|
||||
IpAddress *string `json:"ipAddress,omitempty" xmlrpc:"ipAddress,omitempty"`
|
||||
|
||||
// Label or description of the event object
|
||||
Label *string `json:"label,omitempty" xmlrpc:"label,omitempty"`
|
||||
|
||||
// Meta data for an event in JSON string
|
||||
MetaData *string `json:"metaData,omitempty" xmlrpc:"metaData,omitempty"`
|
||||
|
||||
// Event object id
|
||||
ObjectId *int `json:"objectId,omitempty" xmlrpc:"objectId,omitempty"`
|
||||
|
||||
// Event object name such as "server", "dns" and so on.
|
||||
ObjectName *string `json:"objectName,omitempty" xmlrpc:"objectName,omitempty"`
|
||||
|
||||
// OpenIdConnectUserName of the customer who initiated the event
|
||||
OpenIdConnectUserName *string `json:"openIdConnectUserName,omitempty" xmlrpc:"openIdConnectUserName,omitempty"`
|
||||
|
||||
// A resource object that is associated with the event
|
||||
Resource *Entity `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
|
||||
// A unique trace id. Multiple event can be grouped by a trace id.
|
||||
TraceId *string `json:"traceId,omitempty" xmlrpc:"traceId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
User *User_Customer `json:"user,omitempty" xmlrpc:"user,omitempty"`
|
||||
|
||||
// Id of customer who initiated the event
|
||||
UserId *int `json:"userId,omitempty" xmlrpc:"userId,omitempty"`
|
||||
|
||||
// Type of user that triggered the event. User type can be CUSTOMER, EMPLOYEE or SYSTEM.
|
||||
UserType *string `json:"userType,omitempty" xmlrpc:"userType,omitempty"`
|
||||
|
||||
// Customer username who initiated the event
|
||||
Username *string `json:"username,omitempty" xmlrpc:"username,omitempty"`
|
||||
}
|
110
vendor/github.com/softlayer/softlayer-go/datatypes/flexiblecredit.go
generated
vendored
Normal file
110
vendor/github.com/softlayer/softlayer-go/datatypes/flexiblecredit.go
generated
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type FlexibleCredit_Affiliate struct {
|
||||
Entity
|
||||
|
||||
// Flexible Credit Program the affiliate belongs to.
|
||||
FlexibleCreditProgram *FlexibleCredit_Program `json:"flexibleCreditProgram,omitempty" xmlrpc:"flexibleCreditProgram,omitempty"`
|
||||
|
||||
// Primary ID for the affiliate
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name of this affiliate
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type FlexibleCredit_Company_Type struct {
|
||||
Entity
|
||||
|
||||
// Description of the company type
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Primary ID for the company type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type FlexibleCredit_Enrollment struct {
|
||||
Entity
|
||||
|
||||
// Account the enrollment belongs to
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// Account ID associated with this enrollment
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// Affiliate associated with the account enrollment
|
||||
Affiliate *FlexibleCredit_Affiliate `json:"affiliate,omitempty" xmlrpc:"affiliate,omitempty"`
|
||||
|
||||
// ID of the corresponding Flexible Credit Program Affiliate
|
||||
AffiliateId *int `json:"affiliateId,omitempty" xmlrpc:"affiliateId,omitempty"`
|
||||
|
||||
// Indicates signing of Flexible Credit agreement (independent from MSA)
|
||||
AgreementCompleteFlag *int `json:"agreementCompleteFlag,omitempty" xmlrpc:"agreementCompleteFlag,omitempty"`
|
||||
|
||||
// Brief description of the company
|
||||
CompanyDescription *string `json:"companyDescription,omitempty" xmlrpc:"companyDescription,omitempty"`
|
||||
|
||||
// Category which best describes the company
|
||||
CompanyType *FlexibleCredit_Company_Type `json:"companyType,omitempty" xmlrpc:"companyType,omitempty"`
|
||||
|
||||
// ID of the Flexible Credit Program Company classification for this enrollment
|
||||
CompanyTypeId *int `json:"companyTypeId,omitempty" xmlrpc:"companyTypeId,omitempty"`
|
||||
|
||||
// Date when participation in the Flexible Credit program began
|
||||
EnrollmentDate *Time `json:"enrollmentDate,omitempty" xmlrpc:"enrollmentDate,omitempty"`
|
||||
|
||||
// Discount program the enrollment belongs to
|
||||
FlexibleCreditProgram *FlexibleCredit_Program `json:"flexibleCreditProgram,omitempty" xmlrpc:"flexibleCreditProgram,omitempty"`
|
||||
|
||||
// Date Flexible Credit Program benefits end.
|
||||
GraduationDate *Time `json:"graduationDate,omitempty" xmlrpc:"graduationDate,omitempty"`
|
||||
|
||||
// Flag indicating whether an enrollment is active (true) or inactive (false)
|
||||
IsActiveFlag *bool `json:"isActiveFlag,omitempty" xmlrpc:"isActiveFlag,omitempty"`
|
||||
|
||||
// Amount of monthly credit (USD) given to the account
|
||||
MonthlyCreditAmount *Float64 `json:"monthlyCreditAmount,omitempty" xmlrpc:"monthlyCreditAmount,omitempty"`
|
||||
|
||||
// Employee overseeing the enrollment
|
||||
Representative *User_Employee `json:"representative,omitempty" xmlrpc:"representative,omitempty"`
|
||||
|
||||
// ID of the employee representing this account.
|
||||
RepresentativeEmployeeId *int `json:"representativeEmployeeId,omitempty" xmlrpc:"representativeEmployeeId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type FlexibleCredit_Program struct {
|
||||
Entity
|
||||
|
||||
// Primary ID of the Flexible Credit Program
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Unique name for the Flexible Credit Program
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// Name of the Flexible Credit Program.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
1761
vendor/github.com/softlayer/softlayer-go/datatypes/hardware.go
generated
vendored
Normal file
1761
vendor/github.com/softlayer/softlayer-go/datatypes/hardware.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
245
vendor/github.com/softlayer/softlayer-go/datatypes/layout.go
generated
vendored
Normal file
245
vendor/github.com/softlayer/softlayer-go/datatypes/layout.go
generated
vendored
Normal file
|
@ -0,0 +1,245 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Layout_Container contains definitions for default page layouts
|
||||
type Layout_Container struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of a layout container
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique key name of the layout container, used primarily for programmatic purposes
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// The type of the layout container object
|
||||
LayoutContainerType *Layout_Container_Type `json:"layoutContainerType,omitempty" xmlrpc:"layoutContainerType,omitempty"`
|
||||
|
||||
// The internal identifier of the related [[SoftLayer_Layout_Container_Type]]
|
||||
LayoutContainerTypeId *int `json:"layoutContainerTypeId,omitempty" xmlrpc:"layoutContainerTypeId,omitempty"`
|
||||
|
||||
// A count of the layout items assigned to this layout container
|
||||
LayoutItemCount *uint `json:"layoutItemCount,omitempty" xmlrpc:"layoutItemCount,omitempty"`
|
||||
|
||||
// The layout items assigned to this layout container
|
||||
LayoutItems []Layout_Item `json:"layoutItems,omitempty" xmlrpc:"layoutItems,omitempty"`
|
||||
|
||||
// The friendly name of the layout container
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Container_Type contains definitions for container types
|
||||
type Layout_Container_Type struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of the container type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique key name of the container type, used primarily for programmatic purposes
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// The friendly name of the container type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Item contains definitions for default layout items
|
||||
type Layout_Item struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of a layout item
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique key name of the layout item, used primarily for programmatic purposes
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// A count of the layout preferences assigned to this layout item
|
||||
LayoutItemPreferenceCount *uint `json:"layoutItemPreferenceCount,omitempty" xmlrpc:"layoutItemPreferenceCount,omitempty"`
|
||||
|
||||
// The layout preferences assigned to this layout item
|
||||
LayoutItemPreferences []Layout_Preference `json:"layoutItemPreferences,omitempty" xmlrpc:"layoutItemPreferences,omitempty"`
|
||||
|
||||
// The type of the layout item object
|
||||
LayoutItemType *Layout_Item_Type `json:"layoutItemType,omitempty" xmlrpc:"layoutItemType,omitempty"`
|
||||
|
||||
// The internal identifier of the related [[SoftLayer_Layout_Item_Type]]
|
||||
LayoutItemTypeId *int `json:"layoutItemTypeId,omitempty" xmlrpc:"layoutItemTypeId,omitempty"`
|
||||
|
||||
// The friendly name of the layout item
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Item_Type contains definitions for item types
|
||||
type Layout_Item_Type struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of the item type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique key name of the item type, used primarily for programmatic purposes
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// The friendly name of the item type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Preference contains definitions for default layout item preferences
|
||||
type Layout_Preference struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of a layout preference
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The type of the preference object
|
||||
LayoutPreferenceType *Layout_Preference_Type `json:"layoutPreferenceType,omitempty" xmlrpc:"layoutPreferenceType,omitempty"`
|
||||
|
||||
// The internal identifier of the related [[SoftLayer_Layout_Preference_Type]]
|
||||
LayoutPreferenceTypeId *int `json:"layoutPreferenceTypeId,omitempty" xmlrpc:"layoutPreferenceTypeId,omitempty"`
|
||||
|
||||
// The default value of the preference
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Preference_Type contains definitions for preference types
|
||||
type Layout_Preference_Type struct {
|
||||
Entity
|
||||
|
||||
// The internal identifier of the item type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The unique key name of the item type, used primarily for programmatic purposes
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// The friendly name of the item type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A regular expression used to validate the related [[SoftLayer_Layout_Preference]]
|
||||
ValueExpression *string `json:"valueExpression,omitempty" xmlrpc:"valueExpression,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Profile contains the definition of the layout profile
|
||||
type Layout_Profile struct {
|
||||
Entity
|
||||
|
||||
// Active status of the layout profile
|
||||
ActiveFlag *int `json:"activeFlag,omitempty" xmlrpc:"activeFlag,omitempty"`
|
||||
|
||||
// Timestamp of when the layout profile was created
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The internal identifier of a layout profile
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of
|
||||
LayoutContainerCount *uint `json:"layoutContainerCount,omitempty" xmlrpc:"layoutContainerCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutContainers []Layout_Container `json:"layoutContainers,omitempty" xmlrpc:"layoutContainers,omitempty"`
|
||||
|
||||
// A count of
|
||||
LayoutPreferenceCount *uint `json:"layoutPreferenceCount,omitempty" xmlrpc:"layoutPreferenceCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutPreferences []Layout_Profile_Preference `json:"layoutPreferences,omitempty" xmlrpc:"layoutPreferences,omitempty"`
|
||||
|
||||
// Timestamp of when the layout profile was last updated
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The friendly name of the layout profile
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The [[SoftLayer_User_Customer]] owning this layout profile
|
||||
UserRecordId *int `json:"userRecordId,omitempty" xmlrpc:"userRecordId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Layout_Profile_Containers struct {
|
||||
Entity
|
||||
|
||||
// Timestamp of when the reference was created
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The internal identifier of the container reference
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The id of the referenced [[SoftLayer_Layout_Container]]
|
||||
LayoutContainerId *int `json:"layoutContainerId,omitempty" xmlrpc:"layoutContainerId,omitempty"`
|
||||
|
||||
// The container to be contained
|
||||
LayoutContainerType *Layout_Container `json:"layoutContainerType,omitempty" xmlrpc:"layoutContainerType,omitempty"`
|
||||
|
||||
// The profile containing this container
|
||||
LayoutProfile *Layout_Profile `json:"layoutProfile,omitempty" xmlrpc:"layoutProfile,omitempty"`
|
||||
|
||||
// The id of the referenced [[SoftLayer_Layout_Profile]]
|
||||
LayoutProfileId *int `json:"layoutProfileId,omitempty" xmlrpc:"layoutProfileId,omitempty"`
|
||||
|
||||
// Timestamp of when the reference was last updated
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Layout_Profile_Customer struct {
|
||||
Layout_Profile
|
||||
|
||||
// no documentation yet
|
||||
UserRecord *User_Customer `json:"userRecord,omitempty" xmlrpc:"userRecord,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Profile_Preference contains definitions for layout preferences
|
||||
type Layout_Profile_Preference struct {
|
||||
Entity
|
||||
|
||||
// Timestamp of when the preference was created
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Indicates whether this is a default value or not
|
||||
DefaultValueFlag *int `json:"defaultValueFlag,omitempty" xmlrpc:"defaultValueFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutContainer *Layout_Container `json:"layoutContainer,omitempty" xmlrpc:"layoutContainer,omitempty"`
|
||||
|
||||
// The id of the related [[SoftLayer_Layout_Container]]
|
||||
LayoutContainerId *int `json:"layoutContainerId,omitempty" xmlrpc:"layoutContainerId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutItem *Layout_Item `json:"layoutItem,omitempty" xmlrpc:"layoutItem,omitempty"`
|
||||
|
||||
// The id of the related [[SoftLayer_Layout_Item]]
|
||||
LayoutItemId *int `json:"layoutItemId,omitempty" xmlrpc:"layoutItemId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutPreference *Layout_Preference `json:"layoutPreference,omitempty" xmlrpc:"layoutPreference,omitempty"`
|
||||
|
||||
// The internal identifier of the overridden [[SoftLayer_Layout_Preference]]
|
||||
LayoutPreferenceId *int `json:"layoutPreferenceId,omitempty" xmlrpc:"layoutPreferenceId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LayoutProfile *Layout_Profile `json:"layoutProfile,omitempty" xmlrpc:"layoutProfile,omitempty"`
|
||||
|
||||
// The internal identifier of the related [[SoftLayer_Layout_Profile]]
|
||||
LayoutProfileId *int `json:"layoutProfileId,omitempty" xmlrpc:"layoutProfileId,omitempty"`
|
||||
|
||||
// Timestamp of when the preference was last updated
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The value overriding the default value
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
58
vendor/github.com/softlayer/softlayer-go/datatypes/legal.go
generated
vendored
Normal file
58
vendor/github.com/softlayer/softlayer-go/datatypes/legal.go
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Legal_RegulatedWorkload struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EnabledFlag *bool `json:"enabledFlag,omitempty" xmlrpc:"enabledFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Type *Legal_RegulatedWorkload_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
WorkloadTypeId *int `json:"workloadTypeId,omitempty" xmlrpc:"workloadTypeId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Legal_RegulatedWorkload_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
95
vendor/github.com/softlayer/softlayer-go/datatypes/locale.go
generated
vendored
Normal file
95
vendor/github.com/softlayer/softlayer-go/datatypes/locale.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Locale struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
FriendlyName *string `json:"friendlyName,omitempty" xmlrpc:"friendlyName,omitempty"`
|
||||
|
||||
// Internal identification number of a locale
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LanguageTag *string `json:"languageTag,omitempty" xmlrpc:"languageTag,omitempty"`
|
||||
|
||||
// Locale name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Locale_Country struct {
|
||||
Entity
|
||||
|
||||
// Binary flag denoting if this country is part of the European Union
|
||||
IsEuropeanUnionFlag *int `json:"isEuropeanUnionFlag,omitempty" xmlrpc:"isEuropeanUnionFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LongName *string `json:"longName,omitempty" xmlrpc:"longName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PostalCodeFormat *string `json:"postalCodeFormat,omitempty" xmlrpc:"postalCodeFormat,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PostalCodeRequiredFlag *int `json:"postalCodeRequiredFlag,omitempty" xmlrpc:"postalCodeRequiredFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ShortName *string `json:"shortName,omitempty" xmlrpc:"shortName,omitempty"`
|
||||
|
||||
// A count of states that belong to this country.
|
||||
StateCount *uint `json:"stateCount,omitempty" xmlrpc:"stateCount,omitempty"`
|
||||
|
||||
// States that belong to this country.
|
||||
States []Locale_StateProvince `json:"states,omitempty" xmlrpc:"states,omitempty"`
|
||||
}
|
||||
|
||||
// This object represents a state or province for a country.
|
||||
type Locale_StateProvince struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
LongName *string `json:"longName,omitempty" xmlrpc:"longName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ShortName *string `json:"shortName,omitempty" xmlrpc:"shortName,omitempty"`
|
||||
}
|
||||
|
||||
// Each User is assigned a timezone allowing for a precise local timestamp.
|
||||
type Locale_Timezone struct {
|
||||
Entity
|
||||
|
||||
// A timezone's identifying number.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A timezone's long name. For example, "(GMT-06:00) America/Dallas - CST".
|
||||
LongName *string `json:"longName,omitempty" xmlrpc:"longName,omitempty"`
|
||||
|
||||
// A timezone's name. For example, "America/Dallas".
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A timezone's offset based on the GMT standard. For example, Central Standard Time's offset is "-0600" from GMT=0000.
|
||||
Offset *string `json:"offset,omitempty" xmlrpc:"offset,omitempty"`
|
||||
|
||||
// A timezone's common abbreviation. For example, Central Standard Time's abbreviation is "CST".
|
||||
ShortName *string `json:"shortName,omitempty" xmlrpc:"shortName,omitempty"`
|
||||
}
|
431
vendor/github.com/softlayer/softlayer-go/datatypes/location.go
generated
vendored
Normal file
431
vendor/github.com/softlayer/softlayer-go/datatypes/location.go
generated
vendored
Normal file
|
@ -0,0 +1,431 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// Every piece of hardware and network connection owned by SoftLayer is tracked physically by location and stored in the SoftLayer_Location data type. SoftLayer locations exist in parent/child relationships, a convenient way to track equipment from it's city, datacenter, server room, rack, then slot. Network backbones are tied to datacenters only, not to a room, rack, or slot.
|
||||
type Location struct {
|
||||
Entity
|
||||
|
||||
// A count of
|
||||
BackboneDependentCount *uint `json:"backboneDependentCount,omitempty" xmlrpc:"backboneDependentCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
BackboneDependents []Network_Backbone_Location_Dependent `json:"backboneDependents,omitempty" xmlrpc:"backboneDependents,omitempty"`
|
||||
|
||||
// A count of a location can be a member of 1 or more groups. This will show which groups to which a location belongs.
|
||||
GroupCount *uint `json:"groupCount,omitempty" xmlrpc:"groupCount,omitempty"`
|
||||
|
||||
// A location can be a member of 1 or more groups. This will show which groups to which a location belongs.
|
||||
Groups []Location_Group `json:"groups,omitempty" xmlrpc:"groups,omitempty"`
|
||||
|
||||
// A count of
|
||||
HardwareFirewallCount *uint `json:"hardwareFirewallCount,omitempty" xmlrpc:"hardwareFirewallCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HardwareFirewalls []Hardware `json:"hardwareFirewalls,omitempty" xmlrpc:"hardwareFirewalls,omitempty"`
|
||||
|
||||
// The unique identifier of a specific location.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A location's physical address.
|
||||
LocationAddress *Account_Address `json:"locationAddress,omitempty" xmlrpc:"locationAddress,omitempty"`
|
||||
|
||||
// A location's Dedicated Rack member
|
||||
LocationReservationMember *Location_Reservation_Rack_Member `json:"locationReservationMember,omitempty" xmlrpc:"locationReservationMember,omitempty"`
|
||||
|
||||
// The current locations status.
|
||||
LocationStatus *Location_Status `json:"locationStatus,omitempty" xmlrpc:"locationStatus,omitempty"`
|
||||
|
||||
// A longer location description.
|
||||
LongName *string `json:"longName,omitempty" xmlrpc:"longName,omitempty"`
|
||||
|
||||
// A short location description.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NetworkConfigurationAttribute *Hardware_Attribute `json:"networkConfigurationAttribute,omitempty" xmlrpc:"networkConfigurationAttribute,omitempty"`
|
||||
|
||||
// The total number of users online using SoftLayer's PPTP VPN service for a location.
|
||||
OnlinePptpVpnUserCount *int `json:"onlinePptpVpnUserCount,omitempty" xmlrpc:"onlinePptpVpnUserCount,omitempty"`
|
||||
|
||||
// The total number of users online using SoftLayer's SSL VPN service for a location.
|
||||
OnlineSslVpnUserCount *int `json:"onlineSslVpnUserCount,omitempty" xmlrpc:"onlineSslVpnUserCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PathString *string `json:"pathString,omitempty" xmlrpc:"pathString,omitempty"`
|
||||
|
||||
// A count of a location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
|
||||
PriceGroupCount *uint `json:"priceGroupCount,omitempty" xmlrpc:"priceGroupCount,omitempty"`
|
||||
|
||||
// A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
|
||||
PriceGroups []Location_Group `json:"priceGroups,omitempty" xmlrpc:"priceGroups,omitempty"`
|
||||
|
||||
// A count of a location can be a member of 1 or more regions. This will show which regions to which a location belongs.
|
||||
RegionCount *uint `json:"regionCount,omitempty" xmlrpc:"regionCount,omitempty"`
|
||||
|
||||
// A location can be a member of 1 or more regions. This will show which regions to which a location belongs.
|
||||
Regions []Location_Region `json:"regions,omitempty" xmlrpc:"regions,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Timezone *Locale_Timezone `json:"timezone,omitempty" xmlrpc:"timezone,omitempty"`
|
||||
|
||||
// A location can be a member of 1 Bandwidth Pooling Group. This will show which group to which a location belongs.
|
||||
VdrGroup *Location_Group_Location_CrossReference `json:"vdrGroup,omitempty" xmlrpc:"vdrGroup,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Datacenter extends the [[SoftLayer_Location]] data type to include datacenter-specific properties.
|
||||
type Location_Datacenter struct {
|
||||
Location
|
||||
|
||||
// A count of
|
||||
ActiveItemPresaleEventCount *uint `json:"activeItemPresaleEventCount,omitempty" xmlrpc:"activeItemPresaleEventCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ActiveItemPresaleEvents []Sales_Presale_Event `json:"activeItemPresaleEvents,omitempty" xmlrpc:"activeItemPresaleEvents,omitempty"`
|
||||
|
||||
// A count of
|
||||
ActivePresaleEventCount *uint `json:"activePresaleEventCount,omitempty" xmlrpc:"activePresaleEventCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ActivePresaleEvents []Sales_Presale_Event `json:"activePresaleEvents,omitempty" xmlrpc:"activePresaleEvents,omitempty"`
|
||||
|
||||
// A count of
|
||||
BackendHardwareRouterCount *uint `json:"backendHardwareRouterCount,omitempty" xmlrpc:"backendHardwareRouterCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
BackendHardwareRouters []Hardware `json:"backendHardwareRouters,omitempty" xmlrpc:"backendHardwareRouters,omitempty"`
|
||||
|
||||
// A count of subnets which are directly bound to one or more routers in a given datacenter, and currently allow routing.
|
||||
BoundSubnetCount *uint `json:"boundSubnetCount,omitempty" xmlrpc:"boundSubnetCount,omitempty"`
|
||||
|
||||
// Subnets which are directly bound to one or more routers in a given datacenter, and currently allow routing.
|
||||
BoundSubnets []Network_Subnet `json:"boundSubnets,omitempty" xmlrpc:"boundSubnets,omitempty"`
|
||||
|
||||
// A count of this references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
BrandCountryRestrictionCount *uint `json:"brandCountryRestrictionCount,omitempty" xmlrpc:"brandCountryRestrictionCount,omitempty"`
|
||||
|
||||
// This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
BrandCountryRestrictions []Brand_Restriction_Location_CustomerCountry `json:"brandCountryRestrictions,omitempty" xmlrpc:"brandCountryRestrictions,omitempty"`
|
||||
|
||||
// A count of
|
||||
FrontendHardwareRouterCount *uint `json:"frontendHardwareRouterCount,omitempty" xmlrpc:"frontendHardwareRouterCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
FrontendHardwareRouters []Hardware `json:"frontendHardwareRouters,omitempty" xmlrpc:"frontendHardwareRouters,omitempty"`
|
||||
|
||||
// A count of
|
||||
HardwareRouterCount *uint `json:"hardwareRouterCount,omitempty" xmlrpc:"hardwareRouterCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HardwareRouters []Hardware `json:"hardwareRouters,omitempty" xmlrpc:"hardwareRouters,omitempty"`
|
||||
|
||||
// A count of
|
||||
PresaleEventCount *uint `json:"presaleEventCount,omitempty" xmlrpc:"presaleEventCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PresaleEvents []Sales_Presale_Event `json:"presaleEvents,omitempty" xmlrpc:"presaleEvents,omitempty"`
|
||||
|
||||
// The regional group this datacenter belongs to.
|
||||
RegionalGroup *Location_Group_Regional `json:"regionalGroup,omitempty" xmlrpc:"regionalGroup,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RegionalInternetRegistry *Network_Regional_Internet_Registry `json:"regionalInternetRegistry,omitempty" xmlrpc:"regionalInternetRegistry,omitempty"`
|
||||
|
||||
// A count of retrieve all subnets that are eligible to be routed; those which the account has permission to associate with a vlan.
|
||||
RoutableBoundSubnetCount *uint `json:"routableBoundSubnetCount,omitempty" xmlrpc:"routableBoundSubnetCount,omitempty"`
|
||||
|
||||
// Retrieve all subnets that are eligible to be routed; those which the account has permission to associate with a vlan.
|
||||
RoutableBoundSubnets []Network_Subnet `json:"routableBoundSubnets,omitempty" xmlrpc:"routableBoundSubnets,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of the locations in a group.
|
||||
LocationCount *uint `json:"locationCount,omitempty" xmlrpc:"locationCount,omitempty"`
|
||||
|
||||
// The type for this location group.
|
||||
LocationGroupType *Location_Group_Type `json:"locationGroupType,omitempty" xmlrpc:"locationGroupType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationGroupTypeId *int `json:"locationGroupTypeId,omitempty" xmlrpc:"locationGroupTypeId,omitempty"`
|
||||
|
||||
// The locations in a group.
|
||||
Locations []Location `json:"locations,omitempty" xmlrpc:"locations,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SecurityLevelId *int `json:"securityLevelId,omitempty" xmlrpc:"securityLevelId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Location_CrossReference struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationGroup *Location_Group `json:"locationGroup,omitempty" xmlrpc:"locationGroup,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationGroupId *int `json:"locationGroupId,omitempty" xmlrpc:"locationGroupId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// If set, this is the priority of this cross reference record in the group.
|
||||
Priority *int `json:"priority,omitempty" xmlrpc:"priority,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Pricing struct {
|
||||
Location_Group
|
||||
|
||||
// A count of the prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
|
||||
PriceCount *uint `json:"priceCount,omitempty" xmlrpc:"priceCount,omitempty"`
|
||||
|
||||
// The prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
|
||||
Prices []Product_Item_Price `json:"prices,omitempty" xmlrpc:"prices,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Regional struct {
|
||||
Location_Group
|
||||
|
||||
// A count of the datacenters in a group.
|
||||
DatacenterCount *uint `json:"datacenterCount,omitempty" xmlrpc:"datacenterCount,omitempty"`
|
||||
|
||||
// The datacenters in a group.
|
||||
Datacenters []Location `json:"datacenters,omitempty" xmlrpc:"datacenters,omitempty"`
|
||||
|
||||
// The preferred datacenters of a group.
|
||||
PreferredDatacenter *Location_Datacenter `json:"preferredDatacenter,omitempty" xmlrpc:"preferredDatacenter,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Inventory_Room extends the [[SoftLayer_Location]] data type to include inventory room-specific properties.
|
||||
type Location_Inventory_Room struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Network_Operations_Center extends the [[SoftLayer_Location]] data type to include network operation center-specific properties.
|
||||
type Location_Network_Operations_Center struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Office extends the [[SoftLayer_Location]] data type to include office-specific properties.
|
||||
type Location_Office struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Rack extends the [[SoftLayer_Location]] data type to include rack-specific properties.
|
||||
type Location_Rack struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// A region is made up of a keyname and a description of that region. A region keyname can be used as part of an order. Check the SoftLayer_Product_Order service for more details.
|
||||
type Location_Region struct {
|
||||
Entity
|
||||
|
||||
// A short description of a region's name. This description is seen on the order forms.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// A unique key name for a region. Provided for easy debugging. This is to be sent in with an order.
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// Each region can have many datacenter locations tied to it. However, this is the location we currently provision to for a region. This location is the current valid location for a region.
|
||||
Location *Location_Region_Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// An integer representing the order in which this element is displayed.
|
||||
SortOrder *int `json:"sortOrder,omitempty" xmlrpc:"sortOrder,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Location_Region_Location is very specific to the location where services will actually be provisioned. When accessed through a package, this location is the top priority location for a region. All new servers and services are provisioned at this location. When a server is ordered and a region is selected, this is the location within that region where the server will actually exist and have software/services installed.
|
||||
type Location_Region_Location struct {
|
||||
Entity
|
||||
|
||||
// The SoftLayer_Location tied to a region's location. This provides more information about the location, including specific datacenter information.
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// A count of a region's location also has delivery information as well as other information to be determined. For now, availability is provided and could weigh into the decision as to where to decide to have a server provisioned.'
|
||||
LocationPackageDetailCount *uint `json:"locationPackageDetailCount,omitempty" xmlrpc:"locationPackageDetailCount,omitempty"`
|
||||
|
||||
// A region's location also has delivery information as well as other information to be determined. For now, availability is provided and could weigh into the decision as to where to decide to have a server provisioned.'
|
||||
LocationPackageDetails []Product_Package_Locations `json:"locationPackageDetails,omitempty" xmlrpc:"locationPackageDetails,omitempty"`
|
||||
|
||||
// The region to which this location belongs.
|
||||
Region *Location_Region `json:"region,omitempty" xmlrpc:"region,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation struct {
|
||||
Entity
|
||||
|
||||
// The account that a billing item belongs to.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The bandwidth allotment that the reservation belongs to.
|
||||
Allotment *Network_Bandwidth_Version1_Allotment `json:"allotment,omitempty" xmlrpc:"allotment,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AllotmentId *int `json:"allotmentId,omitempty" xmlrpc:"allotmentId,omitempty"`
|
||||
|
||||
// The bandwidth allotment that the reservation belongs to.
|
||||
BillingItem *Billing_Item `json:"billingItem,omitempty" xmlrpc:"billingItem,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The datacenter location that the reservation belongs to.
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// Rack information for the reservation
|
||||
LocationReservationRack *Location_Reservation_Rack `json:"locationReservationRack,omitempty" xmlrpc:"locationReservationRack,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation_Rack struct {
|
||||
Entity
|
||||
|
||||
// The bandwidth allotment that the reservation belongs to.
|
||||
Allotment *Network_Bandwidth_Version1_Allotment `json:"allotment,omitempty" xmlrpc:"allotment,omitempty"`
|
||||
|
||||
// Members of the rack.
|
||||
Children []Location_Reservation_Rack_Member `json:"children,omitempty" xmlrpc:"children,omitempty"`
|
||||
|
||||
// A count of members of the rack.
|
||||
ChildrenCount *uint `json:"childrenCount,omitempty" xmlrpc:"childrenCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationReservation *Location_Reservation `json:"locationReservation,omitempty" xmlrpc:"locationReservation,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationReservationId *int `json:"locationReservationId,omitempty" xmlrpc:"locationReservationId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NetworkConnectionCapacity *int `json:"networkConnectionCapacity,omitempty" xmlrpc:"networkConnectionCapacity,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NetworkConnectionReservation *int `json:"networkConnectionReservation,omitempty" xmlrpc:"networkConnectionReservation,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PowerConnectionCapacity *int `json:"powerConnectionCapacity,omitempty" xmlrpc:"powerConnectionCapacity,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PowerConnectionReservation *int `json:"powerConnectionReservation,omitempty" xmlrpc:"powerConnectionReservation,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SlotCapacity *int `json:"slotCapacity,omitempty" xmlrpc:"slotCapacity,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SlotReservation *int `json:"slotReservation,omitempty" xmlrpc:"slotReservation,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation_Rack_Member struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Location relation for the rack member
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LocationReservationRack *Location_Reservation `json:"locationReservationRack,omitempty" xmlrpc:"locationReservationRack,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Root extends the [[SoftLayer_Location]] data type to include root-specific properties.
|
||||
type Location_Root struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Server_Room extends the [[SoftLayer_Location]] data type to include server room-specific properties.
|
||||
type Location_Server_Room struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Slot extends the [[SoftLayer_Location]] data type to include slot-specific properties.
|
||||
type Location_Slot struct {
|
||||
Location
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Status models the state of any location. SoftLayer uses the following status codes:
|
||||
//
|
||||
//
|
||||
// *'''ACTIVE''': The location is currently active and available for public usage.
|
||||
// *'''PLANNED''': Used when a location is planned but not yet active.
|
||||
// *'''RETIRED''': Used when a location has been retired and no longer active.
|
||||
//
|
||||
//
|
||||
// Locations in use should stay in the ACTIVE state. If a locations status ever reads anything else and contains active hardware then please contact SoftLayer support.
|
||||
type Location_Status struct {
|
||||
Entity
|
||||
|
||||
// A locations status's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A Location's status code. See the SoftLayer_Locaiton_Status Overview for ''status''' possible values.
|
||||
Status *string `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Storage_Room extends the [[SoftLayer_Location]] data type to include storage room-specific properties.
|
||||
type Location_Storage_Room struct {
|
||||
Location
|
||||
}
|
195
vendor/github.com/softlayer/softlayer-go/datatypes/marketplace.go
generated
vendored
Normal file
195
vendor/github.com/softlayer/softlayer-go/datatypes/marketplace.go
generated
vendored
Normal file
|
@ -0,0 +1,195 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_EmailDistribution struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Email *string `json:"email,omitempty" xmlrpc:"email,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AttachedFiles []Marketplace_Partner_Attachment `json:"attachedFiles,omitempty" xmlrpc:"attachedFiles,omitempty"`
|
||||
|
||||
// A count of
|
||||
AttachmentCount *uint `json:"attachmentCount,omitempty" xmlrpc:"attachmentCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Attachments []Marketplace_Partner_Attachment `json:"attachments,omitempty" xmlrpc:"attachments,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyDescription *string `json:"companyDescription,omitempty" xmlrpc:"companyDescription,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CompanyName *string `json:"companyName,omitempty" xmlrpc:"companyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HeadlineDescription *string `json:"headlineDescription,omitempty" xmlrpc:"headlineDescription,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkFreeTrial *string `json:"linkFreeTrial,omitempty" xmlrpc:"linkFreeTrial,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkOrderPage *string `json:"linkOrderPage,omitempty" xmlrpc:"linkOrderPage,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LinkWebsite *string `json:"linkWebsite,omitempty" xmlrpc:"linkWebsite,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LogoMedium *Marketplace_Partner_Attachment `json:"logoMedium,omitempty" xmlrpc:"logoMedium,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LogoMediumTemp *Marketplace_Partner_Attachment `json:"logoMediumTemp,omitempty" xmlrpc:"logoMediumTemp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LogoSmall *Marketplace_Partner_Attachment `json:"logoSmall,omitempty" xmlrpc:"logoSmall,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LogoSmallTemp *Marketplace_Partner_Attachment `json:"logoSmallTemp,omitempty" xmlrpc:"logoSmallTemp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MetaDescription *string `json:"metaDescription,omitempty" xmlrpc:"metaDescription,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MetaKeywords *string `json:"metaKeywords,omitempty" xmlrpc:"metaKeywords,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductBenefits *string `json:"productBenefits,omitempty" xmlrpc:"productBenefits,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductCategoryId *int `json:"productCategoryId,omitempty" xmlrpc:"productCategoryId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductDescriptionLong *string `json:"productDescriptionLong,omitempty" xmlrpc:"productDescriptionLong,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductDescriptionShort *string `json:"productDescriptionShort,omitempty" xmlrpc:"productDescriptionShort,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductFeatures *string `json:"productFeatures,omitempty" xmlrpc:"productFeatures,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductName *string `json:"productName,omitempty" xmlrpc:"productName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ProductTitle *string `json:"productTitle,omitempty" xmlrpc:"productTitle,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
UrlIdentifier *string `json:"urlIdentifier,omitempty" xmlrpc:"urlIdentifier,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner_Attachment struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AttachmentType *Marketplace_Partner_Attachment_Type `json:"attachmentType,omitempty" xmlrpc:"attachmentType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AttachmentTypeId *int `json:"attachmentTypeId,omitempty" xmlrpc:"attachmentTypeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
BaseName *string `json:"baseName,omitempty" xmlrpc:"baseName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DisplayName *string `json:"displayName,omitempty" xmlrpc:"displayName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
FileName *string `json:"fileName,omitempty" xmlrpc:"fileName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MarketplacePartnerId *int `json:"marketplacePartnerId,omitempty" xmlrpc:"marketplacePartnerId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
SaveAsName *string `json:"saveAsName,omitempty" xmlrpc:"saveAsName,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner_Attachment_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner_File struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Attributes *Marketplace_Partner_File_Attributes `json:"attributes,omitempty" xmlrpc:"attributes,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Contents *[]byte `json:"contents,omitempty" xmlrpc:"contents,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner_File_Attributes struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Bits *int `json:"bits,omitempty" xmlrpc:"bits,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Channels *int `json:"channels,omitempty" xmlrpc:"channels,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Height *int `json:"height,omitempty" xmlrpc:"height,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HtmlAttributes *string `json:"htmlAttributes,omitempty" xmlrpc:"htmlAttributes,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ImageType *int `json:"imageType,omitempty" xmlrpc:"imageType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
IsImage *bool `json:"isImage,omitempty" xmlrpc:"isImage,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MimeType *string `json:"mimeType,omitempty" xmlrpc:"mimeType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Width *int `json:"width,omitempty" xmlrpc:"width,omitempty"`
|
||||
}
|
319
vendor/github.com/softlayer/softlayer-go/datatypes/mcafee.go
generated
vendored
Normal file
319
vendor/github.com/softlayer/softlayer-go/datatypes/mcafee.go
generated
vendored
Normal file
|
@ -0,0 +1,319 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Agent_Details data type represents a virus scan agent and contains details about its version.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Agent_Details struct {
|
||||
Entity
|
||||
|
||||
// Version number of the anti-virus scan agent.
|
||||
AgentVersion *string `json:"agentVersion,omitempty" xmlrpc:"agentVersion,omitempty"`
|
||||
|
||||
// The current anti-virus policy of an agent.
|
||||
CurrentPolicy *McAfee_Epolicy_Orchestrator_Version36_Agent_Parent_Details `json:"currentPolicy,omitempty" xmlrpc:"currentPolicy,omitempty"`
|
||||
|
||||
// The date of the last time the anti-virus agent checked in.
|
||||
LastUpdate *string `json:"lastUpdate,omitempty" xmlrpc:"lastUpdate,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Agent_Parent_Details data type contains the name of an anti-virus policy.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Agent_Parent_Details struct {
|
||||
Entity
|
||||
|
||||
// The current anti-virus policy of an agent.
|
||||
CurrentPolicy *McAfee_Epolicy_Orchestrator_Version36_Agent_Parent_Details `json:"currentPolicy,omitempty" xmlrpc:"currentPolicy,omitempty"`
|
||||
|
||||
// The name of a policy.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event data type represents a single anti-virus event. It contains details about the event such as the date the event occurred, the virus that is detected and the action that is taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event struct {
|
||||
Entity
|
||||
|
||||
// The date when an anti-virus event occurs.
|
||||
EventLocalDateTime *Time `json:"eventLocalDateTime,omitempty" xmlrpc:"eventLocalDateTime,omitempty"`
|
||||
|
||||
// Name of the file found to be infected.
|
||||
Filename *string `json:"filename,omitempty" xmlrpc:"filename,omitempty"`
|
||||
|
||||
// The action taken when a virus is detected.
|
||||
VirusActionTaken *McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_Filter_Description `json:"virusActionTaken,omitempty" xmlrpc:"virusActionTaken,omitempty"`
|
||||
|
||||
// The name of a virus that is found.
|
||||
VirusName *string `json:"virusName,omitempty" xmlrpc:"virusName,omitempty"`
|
||||
|
||||
// The type of virus that is found.
|
||||
VirusType *string `json:"virusType,omitempty" xmlrpc:"virusType,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_AccessProtection data type represents an access protection event. It contains details about the event such as when it occurs, the process that caused it, and the rule that triggered the event.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_AccessProtection struct {
|
||||
Entity
|
||||
|
||||
// The date that an access protection event occurs.
|
||||
EventLocalDateTime *Time `json:"eventLocalDateTime,omitempty" xmlrpc:"eventLocalDateTime,omitempty"`
|
||||
|
||||
// The name of the file that was protected from access.
|
||||
Filename *string `json:"filename,omitempty" xmlrpc:"filename,omitempty"`
|
||||
|
||||
// The name of the process that was protected from access.
|
||||
ProcessName *string `json:"processName,omitempty" xmlrpc:"processName,omitempty"`
|
||||
|
||||
// The name of the rule that triggered an access protection event.
|
||||
RuleName *string `json:"ruleName,omitempty" xmlrpc:"ruleName,omitempty"`
|
||||
|
||||
// The IP address that caused an access protection event.
|
||||
Source *string `json:"source,omitempty" xmlrpc:"source,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_Filter_Description data type contains the name of the rule that was triggered by an anti-virus event.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_Filter_Description struct {
|
||||
Entity
|
||||
|
||||
// The name of the rule that triggered an anti-virus event.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_BlockedApplicationEvent data type contains a single blocked application event. The details of the event are the time the event occurred, the process that generated the event and a brief description of the application that was blocked.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_BlockedApplicationEvent struct {
|
||||
Entity
|
||||
|
||||
// A brief description of the application that is blocked.
|
||||
ApplicationDescription *string `json:"applicationDescription,omitempty" xmlrpc:"applicationDescription,omitempty"`
|
||||
|
||||
// The time that an application is blocked.
|
||||
IncidentTime *Time `json:"incidentTime,omitempty" xmlrpc:"incidentTime,omitempty"`
|
||||
|
||||
// The name of a process that is blocked.
|
||||
ProcessName *string `json:"processName,omitempty" xmlrpc:"processName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_Event_Signature data type contains the signature name of a rule that generated an IPS event.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_Event_Signature struct {
|
||||
Entity
|
||||
|
||||
// The name of a rule that triggered an IPS event.
|
||||
SignatureName *string `json:"signatureName,omitempty" xmlrpc:"signatureName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_IPSEvent data type represents a single IPS event. It contains details about the event such as the date the event occurred, the process that generated it, the severity of the event, and the action taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_IPSEvent struct {
|
||||
Entity
|
||||
|
||||
// The time when an IPS event occurred.
|
||||
IncidentTime *Time `json:"incidentTime,omitempty" xmlrpc:"incidentTime,omitempty"`
|
||||
|
||||
// Name of the process that generated an IPS event.
|
||||
ProcessName *string `json:"processName,omitempty" xmlrpc:"processName,omitempty"`
|
||||
|
||||
// The action taken because of an IPS event.
|
||||
ReactionText *string `json:"reactionText,omitempty" xmlrpc:"reactionText,omitempty"`
|
||||
|
||||
// The IP address that generated an IPS event.
|
||||
RemoteIpAddress *string `json:"remoteIpAddress,omitempty" xmlrpc:"remoteIpAddress,omitempty"`
|
||||
|
||||
// The severity level for an IPS event.
|
||||
SeverityText *string `json:"severityText,omitempty" xmlrpc:"severityText,omitempty"`
|
||||
|
||||
// The signature that generated an IPS event.
|
||||
Signature *McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_Event_Signature `json:"signature,omitempty" xmlrpc:"signature,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_BlockedApplicationEvent data type contains a single blocked application event. The details of the event are the time the event occurred, the process that generated the event and a brief description of the application that was blocked.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_BlockedApplicationEvent struct {
|
||||
Entity
|
||||
|
||||
// A brief description of the application that is blocked.
|
||||
ApplicationDescription *string `json:"applicationDescription,omitempty" xmlrpc:"applicationDescription,omitempty"`
|
||||
|
||||
// The time that an application is blocked.
|
||||
IncidentTime *Time `json:"incidentTime,omitempty" xmlrpc:"incidentTime,omitempty"`
|
||||
|
||||
// The name of a process that is blocked.
|
||||
ProcessName *string `json:"processName,omitempty" xmlrpc:"processName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_Event_Signature data type contains the signature name of a rule that generated an IPS event.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_Event_Signature struct {
|
||||
Entity
|
||||
|
||||
// The name of a rule that triggered an IPS event.
|
||||
SignatureName *string `json:"signatureName,omitempty" xmlrpc:"signatureName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_IPSEvent data type represents a single IPS event. It contains details about the event such as the date the event occurred, the process that generated it, the severity of the event, and the action taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_IPSEvent struct {
|
||||
Entity
|
||||
|
||||
// The time when an IPS event occurred.
|
||||
IncidentTime *Time `json:"incidentTime,omitempty" xmlrpc:"incidentTime,omitempty"`
|
||||
|
||||
// Name of the process that generated an IPS event.
|
||||
ProcessName *string `json:"processName,omitempty" xmlrpc:"processName,omitempty"`
|
||||
|
||||
// The action taken because of an IPS event.
|
||||
ReactionText *string `json:"reactionText,omitempty" xmlrpc:"reactionText,omitempty"`
|
||||
|
||||
// The IP address that generated an IPS event.
|
||||
RemoteIpAddress *string `json:"remoteIpAddress,omitempty" xmlrpc:"remoteIpAddress,omitempty"`
|
||||
|
||||
// The severity level for an IPS event.
|
||||
SeverityText *string `json:"severityText,omitempty" xmlrpc:"severityText,omitempty"`
|
||||
|
||||
// The signature that generated an IPS event.
|
||||
Signature *McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_Event_Signature `json:"signature,omitempty" xmlrpc:"signature,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Policy_Object data type contains the name of a policy that may be assigned to a server.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Policy_Object struct {
|
||||
Entity
|
||||
|
||||
// The name of a policy.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version36_Product_Properties data type contains the virus definition file version.
|
||||
type McAfee_Epolicy_Orchestrator_Version36_Product_Properties struct {
|
||||
Entity
|
||||
|
||||
// The virus definition file version.
|
||||
DatVersion *string `json:"datVersion,omitempty" xmlrpc:"datVersion,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Agent_Details data type represents a virus scan agent and contains details about its version.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Agent_Details struct {
|
||||
Entity
|
||||
|
||||
// Version number of the anti-virus scan agent.
|
||||
AgentVersion *string `json:"agentVersion,omitempty" xmlrpc:"agentVersion,omitempty"`
|
||||
|
||||
// The date of the last time the anti-virus agent checked in.
|
||||
LastUpdate *Time `json:"lastUpdate,omitempty" xmlrpc:"lastUpdate,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Agent_Parent_Details data type contains the name of an anti-virus policy.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Agent_Parent_Details struct {
|
||||
Entity
|
||||
|
||||
// Additional information about an agent.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version45_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// The name of a policy.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The current anti-virus policy of an agent.
|
||||
Policies []McAfee_Epolicy_Orchestrator_Version45_Agent_Parent_Details `json:"policies,omitempty" xmlrpc:"policies,omitempty"`
|
||||
|
||||
// A count of the current anti-virus policy of an agent.
|
||||
PolicyCount *uint `json:"policyCount,omitempty" xmlrpc:"policyCount,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Event data type represents a single event. It contains details about the event such as the date the event occurred, the virus or intrusion that is detected and the action that is taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Event struct {
|
||||
Entity
|
||||
|
||||
// Additional information about an agent.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version45_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// The time that an event was detected.
|
||||
DetectedUtc *Time `json:"detectedUtc,omitempty" xmlrpc:"detectedUtc,omitempty"`
|
||||
|
||||
// The IP address of the source that generated an event.
|
||||
SourceIpv4 *string `json:"sourceIpv4,omitempty" xmlrpc:"sourceIpv4,omitempty"`
|
||||
|
||||
// The name of the process that generated an event.
|
||||
SourceProcessName *string `json:"sourceProcessName,omitempty" xmlrpc:"sourceProcessName,omitempty"`
|
||||
|
||||
// The name of the file that was the target of the event.
|
||||
TargetFilename *string `json:"targetFilename,omitempty" xmlrpc:"targetFilename,omitempty"`
|
||||
|
||||
// The action taken regarding a threat.
|
||||
ThreatActionTaken *string `json:"threatActionTaken,omitempty" xmlrpc:"threatActionTaken,omitempty"`
|
||||
|
||||
// The name of the threat.
|
||||
ThreatName *string `json:"threatName,omitempty" xmlrpc:"threatName,omitempty"`
|
||||
|
||||
// The textual representation of the severity level.
|
||||
ThreatSeverityLabel *string `json:"threatSeverityLabel,omitempty" xmlrpc:"threatSeverityLabel,omitempty"`
|
||||
|
||||
// The type of threat.
|
||||
ThreatType *string `json:"threatType,omitempty" xmlrpc:"threatType,omitempty"`
|
||||
|
||||
// The action taken when a virus is detected.
|
||||
VirusActionTaken *McAfee_Epolicy_Orchestrator_Version45_Event_Filter_Description `json:"virusActionTaken,omitempty" xmlrpc:"virusActionTaken,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Event_Filter_Description data type contains the name of the rule that was triggered by an event.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Event_Filter_Description struct {
|
||||
Entity
|
||||
|
||||
// The name of the rule that triggered an event.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Event_Version7 data type represents a single event. It contains details about the event such as the date the event occurred, the virus or intrusion that is detected and the action that is taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Event_Version7 struct {
|
||||
McAfee_Epolicy_Orchestrator_Version45_Event
|
||||
|
||||
// The signature information for an event.
|
||||
Signature *McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version7 `json:"signature,omitempty" xmlrpc:"signature,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Event_Version8 data type represents a single event. It contains details about the event such as the date the event occurred, the virus or intrusion that is detected and the action that is taken.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Event_Version8 struct {
|
||||
McAfee_Epolicy_Orchestrator_Version45_Event
|
||||
|
||||
// The signature information for an event.
|
||||
Signature *McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version8 `json:"signature,omitempty" xmlrpc:"signature,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version7 data type contains the signature name of a rule that generated an IPS event.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version7 struct {
|
||||
Entity
|
||||
|
||||
// The name of a rule that triggered an IPS event.
|
||||
SignatureName *string `json:"signatureName,omitempty" xmlrpc:"signatureName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version8 data type contains the signature name of a rule that generated an IPS event.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Hips_Event_Signature_Version8 struct {
|
||||
Entity
|
||||
|
||||
// The name of a rule that triggered an IPS event.
|
||||
SignatureName *string `json:"signatureName,omitempty" xmlrpc:"signatureName,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Policy_Object data type contains the name of a policy that may be assigned to a server.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Policy_Object struct {
|
||||
Entity
|
||||
|
||||
// The name of a policy.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The McAfee_Epolicy_Orchestrator_Version45_Product_Properties data type contains the virus definition file version.
|
||||
type McAfee_Epolicy_Orchestrator_Version45_Product_Properties struct {
|
||||
Entity
|
||||
|
||||
// The virus definition file version.
|
||||
DatVersion *string `json:"datVersion,omitempty" xmlrpc:"datVersion,omitempty"`
|
||||
}
|
207
vendor/github.com/softlayer/softlayer-go/datatypes/metric.go
generated
vendored
Normal file
207
vendor/github.com/softlayer/softlayer-go/datatypes/metric.go
generated
vendored
Normal file
|
@ -0,0 +1,207 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// Metric tracking objects provides a common interface to all metrics provided by SoftLayer. These metrics range from network component traffic for a server to aggregated Bandwidth Pooling traffic and more. Every object within SoftLayer's range of objects that has data that can be tracked over time has an associated tracking object. Use the [[SoftLayer_Metric_Tracking_Object]] service to retrieve raw and graph data from a tracking object.
|
||||
type Metric_Tracking_Object struct {
|
||||
Entity
|
||||
|
||||
// The data recorded by a tracking object.
|
||||
Data []Metric_Tracking_Object_Data `json:"data,omitempty" xmlrpc:"data,omitempty"`
|
||||
|
||||
// A tracking object's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Tracking object label
|
||||
Label *string `json:"label,omitempty" xmlrpc:"label,omitempty"`
|
||||
|
||||
// The identifier of the existing resource this object is attempting to track.
|
||||
ResourceTableId *int `json:"resourceTableId,omitempty" xmlrpc:"resourceTableId,omitempty"`
|
||||
|
||||
// The date this tracker began tracking this particular resource.
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// The type of data that a tracking object polls.
|
||||
Type *Metric_Tracking_Object_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Metric_Tracking_Object_Abstract models a generic tracking object type. Typically a tracking object with a specific purpose has it's own data type defined within the SoftLayer API.
|
||||
type Metric_Tracking_Object_Abstract struct {
|
||||
Metric_Tracking_Object
|
||||
}
|
||||
|
||||
// This data type provides commonly used bandwidth summary components for the current billing cycle.
|
||||
type Metric_Tracking_Object_Bandwidth_Summary struct {
|
||||
Entity
|
||||
|
||||
// This is the amount of bandwidth (measured in gigabytes) allocated for this tracking object.
|
||||
AllocationAmount *Float64 `json:"allocationAmount,omitempty" xmlrpc:"allocationAmount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AllocationId *int `json:"allocationId,omitempty" xmlrpc:"allocationId,omitempty"`
|
||||
|
||||
// The amount of outbound bandwidth (measured in gigabytes) currently used this billing period. Same as $outboundBandwidthAmount. Aliased for backward compatability.
|
||||
AmountOut *Float64 `json:"amountOut,omitempty" xmlrpc:"amountOut,omitempty"`
|
||||
|
||||
// The daily average amount of outbound bandwidth usage.
|
||||
AverageDailyUsage *Float64 `json:"averageDailyUsage,omitempty" xmlrpc:"averageDailyUsage,omitempty"`
|
||||
|
||||
// A flag that tells whether or not this tracking object's bandwidth usage is already over the allocation. 1 means yes, 0 means no.
|
||||
CurrentlyOverAllocationFlag *int `json:"currentlyOverAllocationFlag,omitempty" xmlrpc:"currentlyOverAllocationFlag,omitempty"`
|
||||
|
||||
// The metric tracking id for this resource.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The amount of outbound bandwidth (measured in gigabytes) currently used this billing period
|
||||
OutboundBandwidthAmount *Float64 `json:"outboundBandwidthAmount,omitempty" xmlrpc:"outboundBandwidthAmount,omitempty"`
|
||||
|
||||
// The amount of bandwidth (measured in gigabytes) of projected usage, using a basic average calculation of daily usage.
|
||||
ProjectedBandwidthUsage *Float64 `json:"projectedBandwidthUsage,omitempty" xmlrpc:"projectedBandwidthUsage,omitempty"`
|
||||
|
||||
// A flag that tells whether or not this tracking object's bandwidth usage is projected to go over the allocation, based on daily average usage. 1 means yes, 0 means no.
|
||||
ProjectedOverAllocationFlag *int `json:"projectedOverAllocationFlag,omitempty" xmlrpc:"projectedOverAllocationFlag,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Metric_Tracking_Object_Data models an individual unit of data tracked by a SoftLayer tracking object, including the type of data polled, the date it was polled at, and the counter value that was measured at polling time.
|
||||
type Metric_Tracking_Object_Data struct {
|
||||
Entity
|
||||
|
||||
// The value stored for a data record.
|
||||
Counter *Float64 `json:"counter,omitempty" xmlrpc:"counter,omitempty"`
|
||||
|
||||
// The time a data record was stored.
|
||||
DateTime *Time `json:"dateTime,omitempty" xmlrpc:"dateTime,omitempty"`
|
||||
|
||||
// The type of data held in a record.
|
||||
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Metric_Tracking_Object_Data_Network_ContentDelivery_Account models usage data polled from the CDN system.
|
||||
type Metric_Tracking_Object_Data_Network_ContentDelivery_Account struct {
|
||||
Metric_Tracking_Object_Data
|
||||
|
||||
// The name of a file. This value is only populated in file-based bandwidth reports.
|
||||
FileName *string `json:"fileName,omitempty" xmlrpc:"fileName,omitempty"`
|
||||
|
||||
// The internal identifier of a CDN POP (Points of Presence).
|
||||
PopId *int `json:"popId,omitempty" xmlrpc:"popId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Metric_Tracking_Object_HardwareServer models tracking objects specific to physical hardware and the data that are recorded by those servers.
|
||||
type Metric_Tracking_Object_HardwareServer struct {
|
||||
Metric_Tracking_Object_Abstract
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCycleBandwidthUsage []Network_Bandwidth_Usage `json:"billingCycleBandwidthUsage,omitempty" xmlrpc:"billingCycleBandwidthUsage,omitempty"`
|
||||
|
||||
// A count of the raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCycleBandwidthUsageCount *uint `json:"billingCycleBandwidthUsageCount,omitempty" xmlrpc:"billingCycleBandwidthUsageCount,omitempty"`
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePrivateBandwidthUsage []Network_Bandwidth_Usage `json:"billingCyclePrivateBandwidthUsage,omitempty" xmlrpc:"billingCyclePrivateBandwidthUsage,omitempty"`
|
||||
|
||||
// A count of the raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePrivateBandwidthUsageCount *uint `json:"billingCyclePrivateBandwidthUsageCount,omitempty" xmlrpc:"billingCyclePrivateBandwidthUsageCount,omitempty"`
|
||||
|
||||
// The total private inbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageIn *Float64 `json:"billingCyclePrivateUsageIn,omitempty" xmlrpc:"billingCyclePrivateUsageIn,omitempty"`
|
||||
|
||||
// The total private outbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageOut *Float64 `json:"billingCyclePrivateUsageOut,omitempty" xmlrpc:"billingCyclePrivateUsageOut,omitempty"`
|
||||
|
||||
// The total private bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageTotal *uint `json:"billingCyclePrivateUsageTotal,omitempty" xmlrpc:"billingCyclePrivateUsageTotal,omitempty"`
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePublicBandwidthUsage *Network_Bandwidth_Usage `json:"billingCyclePublicBandwidthUsage,omitempty" xmlrpc:"billingCyclePublicBandwidthUsage,omitempty"`
|
||||
|
||||
// The total public inbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageIn *Float64 `json:"billingCyclePublicUsageIn,omitempty" xmlrpc:"billingCyclePublicUsageIn,omitempty"`
|
||||
|
||||
// The total public outbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageOut *Float64 `json:"billingCyclePublicUsageOut,omitempty" xmlrpc:"billingCyclePublicUsageOut,omitempty"`
|
||||
|
||||
// The total public bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageTotal *uint `json:"billingCyclePublicUsageTotal,omitempty" xmlrpc:"billingCyclePublicUsageTotal,omitempty"`
|
||||
|
||||
// The server that this tracking object tracks.
|
||||
Resource *Hardware_Server `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer [[SoftLayer_Metric_Tracking_Object|tracking objects]] can model various kinds of measured data, from server and virtual server bandwidth usage to CPU use to remote storage usage. SoftLayer_Metric_Tracking_Object_Type models one of these types and is referred to in tracking objects to reflect what type of data they track.
|
||||
type Metric_Tracking_Object_Type struct {
|
||||
Entity
|
||||
|
||||
// Description A tracking object type's key name. This is a shorter description of what kind of data a tracking object group is polling.
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
|
||||
// Description A tracking object type's name. This describes what kind of data a tracking object group is polling.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Metric_Tracking_Object_VirtualDedicatedRack models tracking objects specific to virtual dedicated racks. Bandwidth Pooling aggregate the bandwidth used by multiple servers within the rack.
|
||||
type Metric_Tracking_Object_VirtualDedicatedRack struct {
|
||||
Metric_Tracking_Object_Abstract
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCycleBandwidthUsage []Network_Bandwidth_Usage `json:"billingCycleBandwidthUsage,omitempty" xmlrpc:"billingCycleBandwidthUsage,omitempty"`
|
||||
|
||||
// A count of the raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCycleBandwidthUsageCount *uint `json:"billingCycleBandwidthUsageCount,omitempty" xmlrpc:"billingCycleBandwidthUsageCount,omitempty"`
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePrivateBandwidthUsage []Network_Bandwidth_Usage `json:"billingCyclePrivateBandwidthUsage,omitempty" xmlrpc:"billingCyclePrivateBandwidthUsage,omitempty"`
|
||||
|
||||
// A count of the raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePrivateBandwidthUsageCount *uint `json:"billingCyclePrivateBandwidthUsageCount,omitempty" xmlrpc:"billingCyclePrivateBandwidthUsageCount,omitempty"`
|
||||
|
||||
// The total private inbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageIn *Float64 `json:"billingCyclePrivateUsageIn,omitempty" xmlrpc:"billingCyclePrivateUsageIn,omitempty"`
|
||||
|
||||
// The total private outbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageOut *Float64 `json:"billingCyclePrivateUsageOut,omitempty" xmlrpc:"billingCyclePrivateUsageOut,omitempty"`
|
||||
|
||||
// The total private bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePrivateUsageTotal *uint `json:"billingCyclePrivateUsageTotal,omitempty" xmlrpc:"billingCyclePrivateUsageTotal,omitempty"`
|
||||
|
||||
// The raw bandwidth usage data for the current billing cycle. One object is returned for each network this server is attached to.
|
||||
BillingCyclePublicBandwidthUsage *Network_Bandwidth_Usage `json:"billingCyclePublicBandwidthUsage,omitempty" xmlrpc:"billingCyclePublicBandwidthUsage,omitempty"`
|
||||
|
||||
// The total public inbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageIn *Float64 `json:"billingCyclePublicUsageIn,omitempty" xmlrpc:"billingCyclePublicUsageIn,omitempty"`
|
||||
|
||||
// The total public outbound bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageOut *Float64 `json:"billingCyclePublicUsageOut,omitempty" xmlrpc:"billingCyclePublicUsageOut,omitempty"`
|
||||
|
||||
// The total public bandwidth for this item's resource for the current billing cycle.
|
||||
BillingCyclePublicUsageTotal *uint `json:"billingCyclePublicUsageTotal,omitempty" xmlrpc:"billingCyclePublicUsageTotal,omitempty"`
|
||||
|
||||
// The virtual rack that this tracking object tracks.
|
||||
Resource *Network_Bandwidth_Version1_Allotment `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Metric_Tracking_Object_Virtual_Storage_Repository struct {
|
||||
Metric_Tracking_Object_Abstract
|
||||
|
||||
// The virtual storage repository that this tracking object tracks.
|
||||
Resource *Virtual_Storage_Repository `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
248
vendor/github.com/softlayer/softlayer-go/datatypes/monitoring.go
generated
vendored
Normal file
248
vendor/github.com/softlayer/softlayer-go/datatypes/monitoring.go
generated
vendored
Normal file
|
@ -0,0 +1,248 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// A monitoring agent object contains information describing the agent.
|
||||
type Monitoring_Agent struct {
|
||||
Entity
|
||||
|
||||
// The current status of the corresponding agent
|
||||
AgentStatus *Monitoring_Agent_Status `json:"agentStatus,omitempty" xmlrpc:"agentStatus,omitempty"`
|
||||
|
||||
// A count of all custom configuration profiles associated with the corresponding agent
|
||||
ConfigurationProfileCount *uint `json:"configurationProfileCount,omitempty" xmlrpc:"configurationProfileCount,omitempty"`
|
||||
|
||||
// All custom configuration profiles associated with the corresponding agent
|
||||
ConfigurationProfiles []Configuration_Template_Section_Profile `json:"configurationProfiles,omitempty" xmlrpc:"configurationProfiles,omitempty"`
|
||||
|
||||
// A template of an agent's current configuration which contains information about the structure of the configuration values.
|
||||
ConfigurationTemplate *Configuration_Template `json:"configurationTemplate,omitempty" xmlrpc:"configurationTemplate,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template that is used to configure this agent
|
||||
ConfigurationTemplateId *int `json:"configurationTemplateId,omitempty" xmlrpc:"configurationTemplateId,omitempty"`
|
||||
|
||||
// A count of the values associated with the corresponding Agent configuration.
|
||||
ConfigurationValueCount *uint `json:"configurationValueCount,omitempty" xmlrpc:"configurationValueCount,omitempty"`
|
||||
|
||||
// The values associated with the corresponding Agent configuration.
|
||||
ConfigurationValues []Monitoring_Agent_Configuration_Value `json:"configurationValues,omitempty" xmlrpc:"configurationValues,omitempty"`
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// SoftLayer hardware related to the agent.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring agent
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Last modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// Monitoring agent name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// Contains general information relating to a single SoftLayer product.
|
||||
ProductItem *Product_Item `json:"productItem,omitempty" xmlrpc:"productItem,omitempty"`
|
||||
|
||||
// Indicates if this monitoring agent resides on your local box or on a SoftLayer monitoring cluster.
|
||||
RemoteMonitoringAgentFlag *bool `json:"remoteMonitoringAgentFlag,omitempty" xmlrpc:"remoteMonitoringAgentFlag,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring robot that this agent belongs to
|
||||
RobotId *int `json:"robotId,omitempty" xmlrpc:"robotId,omitempty"`
|
||||
|
||||
// A description for a specific installation of a Software Component
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring agent status
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// Monitoring agent status name.
|
||||
StatusName *string `json:"statusName,omitempty" xmlrpc:"statusName,omitempty"`
|
||||
|
||||
// Softlayer_Virtual_Guest object related to the monitoring agent, which this virtual guest object and hardware is on the server of the running agent.
|
||||
VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Monitoring_Agent_Configuration_Template_Group class is consisted of configuration templates for agents in a monitoring package.
|
||||
type Monitoring_Agent_Configuration_Template_Group struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// Internal identifier of a SoftLayer account that this configuration template belongs to
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// A count of
|
||||
ConfigurationTemplateCount *uint `json:"configurationTemplateCount,omitempty" xmlrpc:"configurationTemplateCount,omitempty"`
|
||||
|
||||
// A count of
|
||||
ConfigurationTemplateReferenceCount *uint `json:"configurationTemplateReferenceCount,omitempty" xmlrpc:"configurationTemplateReferenceCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationTemplateReferences []Monitoring_Agent_Configuration_Template_Group_Reference `json:"configurationTemplateReferences,omitempty" xmlrpc:"configurationTemplateReferences,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationTemplates []Configuration_Template `json:"configurationTemplates,omitempty" xmlrpc:"configurationTemplates,omitempty"`
|
||||
|
||||
// Created date
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Description of a monitoring agent configuration group
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring agent configuration group
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Item *Product_Item `json:"item,omitempty" xmlrpc:"item,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template type
|
||||
ItemId *int `json:"itemId,omitempty" xmlrpc:"itemId,omitempty"`
|
||||
|
||||
// Last modified date
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// Name of a monitoring agent configuration group
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference class holds the reference information, essentially a SQL join, between a monitoring configuration group and agent configuration templates.
|
||||
type Monitoring_Agent_Configuration_Template_Group_Reference struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ConfigurationTemplate *Configuration_Template `json:"configurationTemplate,omitempty" xmlrpc:"configurationTemplate,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration template
|
||||
ConfigurationTemplateId *int `json:"configurationTemplateId,omitempty" xmlrpc:"configurationTemplateId,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration group reference record
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TemplateGroup *Monitoring_Agent_Configuration_Template_Group `json:"templateGroup,omitempty" xmlrpc:"templateGroup,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring agent configuration group
|
||||
TemplateGroupId *int `json:"templateGroupId,omitempty" xmlrpc:"templateGroupId,omitempty"`
|
||||
}
|
||||
|
||||
// Monitoring agent configuration value
|
||||
type Monitoring_Agent_Configuration_Value struct {
|
||||
Entity
|
||||
|
||||
// Internal identifier of a monitoring Agent that this configuration value
|
||||
AgentId *int `json:"agentId,omitempty" xmlrpc:"agentId,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring configuration definition by which
|
||||
ConfigurationDefinitionId *int `json:"configurationDefinitionId,omitempty" xmlrpc:"configurationDefinitionId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Definition *Configuration_Template_Section_Definition `json:"definition,omitempty" xmlrpc:"definition,omitempty"`
|
||||
|
||||
// User-friendly description of a configuration value.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring configuration value.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The metric data type used to retrieve metric data currently being tracked.
|
||||
MetricDataType *Container_Metric_Data_Type `json:"metricDataType,omitempty" xmlrpc:"metricDataType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MonitoringAgent *Monitoring_Agent `json:"monitoringAgent,omitempty" xmlrpc:"monitoringAgent,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Profile *Configuration_Template_Section_Profile `json:"profile,omitempty" xmlrpc:"profile,omitempty"`
|
||||
|
||||
// Internal identifier of a configuration profile. Configuration profile is associated with a configuration section type of "Template section".
|
||||
//
|
||||
// A "Template section" defines skeleton configuration definitions. For instance, if you want to monitor additional hard disks with "CPU/Memory/Disk Monitoring Agent", you will have to add a new configuration profiles.
|
||||
ProfileId *int `json:"profileId,omitempty" xmlrpc:"profileId,omitempty"`
|
||||
|
||||
// Configuration value
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Monitoring agent status
|
||||
type Monitoring_Agent_Status struct {
|
||||
Entity
|
||||
|
||||
// Description of a monitoring agent status
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring agent status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Monitoring agent status name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Monitoring_Robot data type contains general information relating to a monitoring robot.
|
||||
type Monitoring_Robot struct {
|
||||
Entity
|
||||
|
||||
// The account associated with the corresponding robot.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// Internal identifier of a SoftLayer account that this robot belongs to
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring robot
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of the program (monitoring agent) that gets details of a system or application and reporting of the metric data and triggers alarms for predefined events.
|
||||
MonitoringAgentCount *uint `json:"monitoringAgentCount,omitempty" xmlrpc:"monitoringAgentCount,omitempty"`
|
||||
|
||||
// The program (monitoring agent) that gets details of a system or application and reporting of the metric data and triggers alarms for predefined events.
|
||||
MonitoringAgents []Monitoring_Agent `json:"monitoringAgents,omitempty" xmlrpc:"monitoringAgents,omitempty"`
|
||||
|
||||
// Robot name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The current status of the robot.
|
||||
RobotStatus *Monitoring_Robot_Status `json:"robotStatus,omitempty" xmlrpc:"robotStatus,omitempty"`
|
||||
|
||||
// The SoftLayer_Software_Component that corresponds to the robot installation on the server.
|
||||
SoftwareComponent *Software_Component `json:"softwareComponent,omitempty" xmlrpc:"softwareComponent,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring robot status
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
}
|
||||
|
||||
// Your monitoring robot will be in "Active" status under normal circumstances. If you perform an OS reload, your robot will be in "Reclaim" status until it's reloaded on your server or virtual server.
|
||||
//
|
||||
// Advanced monitoring system requires "Nimsoft Monitoring (Advanced)" service running and TCP ports 48000 - 48020 to be open on your server or virtual server. Monitoring agents cannot be managed nor can the usage data be updated if these ports are closed. Your monitoring robot will be in "Limited Connectivity" status if our monitoring management system cannot communicate with your system.
|
||||
//
|
||||
// See [[SoftLayer_Monitoring_Robot::resetStatus|resetStatus]] service for more details.
|
||||
type Monitoring_Robot_Status struct {
|
||||
Entity
|
||||
|
||||
// Monitoring robot status description
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a monitoring robot status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Monitoring robot status name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
5556
vendor/github.com/softlayer/softlayer-go/datatypes/network.go
generated
vendored
Normal file
5556
vendor/github.com/softlayer/softlayer-go/datatypes/network.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
648
vendor/github.com/softlayer/softlayer-go/datatypes/notification.go
generated
vendored
Normal file
648
vendor/github.com/softlayer/softlayer-go/datatypes/notification.go
generated
vendored
Normal file
|
@ -0,0 +1,648 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// Details provided for the notification are basic. Details such as the related preferences, name and keyname for the notification can be retrieved. The keyname property for the notification can be used to refer to a notification when integrating into the SoftLayer Notification system. The name property can used more for display purposes.
|
||||
type Notification struct {
|
||||
Entity
|
||||
|
||||
// Unique identifier for the notification.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name that can be used by external systems to refer to a notification.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// Friendly name for the notification.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of the preferences related to the notification. These are preferences are configurable and optional for subscribers to use.
|
||||
PreferenceCount *uint `json:"preferenceCount,omitempty" xmlrpc:"preferenceCount,omitempty"`
|
||||
|
||||
// The preferences related to the notification. These are preferences are configurable and optional for subscribers to use.
|
||||
Preferences []Notification_Preference `json:"preferences,omitempty" xmlrpc:"preferences,omitempty"`
|
||||
|
||||
// A count of the required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference.
|
||||
RequiredPreferenceCount *uint `json:"requiredPreferenceCount,omitempty" xmlrpc:"requiredPreferenceCount,omitempty"`
|
||||
|
||||
// The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference.
|
||||
RequiredPreferences []Notification_Preference `json:"requiredPreferences,omitempty" xmlrpc:"requiredPreferences,omitempty"`
|
||||
}
|
||||
|
||||
// Provides details for the delivery methods available.
|
||||
type Notification_Delivery_Method struct {
|
||||
Entity
|
||||
|
||||
// Determines if the delivery method is still used by the system.
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// Description used for the delivery method.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Unique identifier for the various notification delivery methods.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name that can be used by external systems to refer to delivery method.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// Friendly name used for the delivery method.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// This is an extension of the SoftLayer_Notification class. These are implementation details specific to those notifications which can be subscribed to and received on a mobile device.
|
||||
type Notification_Mobile struct {
|
||||
Notification
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Occurrence_Account struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LastNotificationUpdate *Notification_Occurrence_Update `json:"lastNotificationUpdate,omitempty" xmlrpc:"lastNotificationUpdate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationOccurrenceEvent *Notification_Occurrence_Event `json:"notificationOccurrenceEvent,omitempty" xmlrpc:"notificationOccurrenceEvent,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Occurrence_Event struct {
|
||||
Entity
|
||||
|
||||
// Indicates whether or not this event has been acknowledged by the user.
|
||||
AcknowledgedFlag *bool `json:"acknowledgedFlag,omitempty" xmlrpc:"acknowledgedFlag,omitempty"`
|
||||
|
||||
// A count of a collection of attachments for this event which provide supplementary information to impacted users some examples are RFO (Reason For Outage) and root cause analysis documents.
|
||||
AttachmentCount *uint `json:"attachmentCount,omitempty" xmlrpc:"attachmentCount,omitempty"`
|
||||
|
||||
// A collection of attachments for this event which provide supplementary information to impacted users some examples are RFO (Reason For Outage) and root cause analysis documents.
|
||||
Attachments []Notification_Occurrence_Event_Attachment `json:"attachments,omitempty" xmlrpc:"attachments,omitempty"`
|
||||
|
||||
// When this event will end.
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// The first update for this event.
|
||||
FirstUpdate *Notification_Occurrence_Update `json:"firstUpdate,omitempty" xmlrpc:"firstUpdate,omitempty"`
|
||||
|
||||
// Unique identifier for this event.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of a collection of accounts impacted by this event. Each impacted account record relates directly to a [[SoftLayer_Account]].
|
||||
ImpactedAccountCount *uint `json:"impactedAccountCount,omitempty" xmlrpc:"impactedAccountCount,omitempty"`
|
||||
|
||||
// A collection of accounts impacted by this event. Each impacted account record relates directly to a [[SoftLayer_Account]].
|
||||
ImpactedAccounts []Notification_Occurrence_Account `json:"impactedAccounts,omitempty" xmlrpc:"impactedAccounts,omitempty"`
|
||||
|
||||
// A count of a collection of resources impacted by this event. Each record will relate to some physical resource that the user has access to such as [[SoftLayer_Hardware]] or [[SoftLayer_Virtual_Guest]].
|
||||
ImpactedResourceCount *uint `json:"impactedResourceCount,omitempty" xmlrpc:"impactedResourceCount,omitempty"`
|
||||
|
||||
// A collection of resources impacted by this event. Each record will relate to some physical resource that the user has access to such as [[SoftLayer_Hardware]] or [[SoftLayer_Virtual_Guest]].
|
||||
ImpactedResources []Notification_Occurrence_Resource `json:"impactedResources,omitempty" xmlrpc:"impactedResources,omitempty"`
|
||||
|
||||
// A count of a collection of users impacted by this event. Each impacted user record relates directly to a [[SoftLayer_User_Customer]].
|
||||
ImpactedUserCount *uint `json:"impactedUserCount,omitempty" xmlrpc:"impactedUserCount,omitempty"`
|
||||
|
||||
// A collection of users impacted by this event. Each impacted user record relates directly to a [[SoftLayer_User_Customer]].
|
||||
ImpactedUsers []Notification_Occurrence_User `json:"impactedUsers,omitempty" xmlrpc:"impactedUsers,omitempty"`
|
||||
|
||||
// Latest count of users impacted by this event.
|
||||
LastImpactedUserCount *int `json:"lastImpactedUserCount,omitempty" xmlrpc:"lastImpactedUserCount,omitempty"`
|
||||
|
||||
// The last update for this event.
|
||||
LastUpdate *Notification_Occurrence_Update `json:"lastUpdate,omitempty" xmlrpc:"lastUpdate,omitempty"`
|
||||
|
||||
// When this event was last updated.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The type of event such as planned or unplanned maintenance.
|
||||
NotificationOccurrenceEventType *Notification_Occurrence_Event_Type `json:"notificationOccurrenceEventType,omitempty" xmlrpc:"notificationOccurrenceEventType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RecoveryTime *int `json:"recoveryTime,omitempty" xmlrpc:"recoveryTime,omitempty"`
|
||||
|
||||
// When this event started.
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StatusCode *Notification_Occurrence_Status_Code `json:"statusCode,omitempty" xmlrpc:"statusCode,omitempty"`
|
||||
|
||||
// Brief description of this event.
|
||||
Subject *string `json:"subject,omitempty" xmlrpc:"subject,omitempty"`
|
||||
|
||||
// Details of this event.
|
||||
Summary *string `json:"summary,omitempty" xmlrpc:"summary,omitempty"`
|
||||
|
||||
// Unique identifier for the [[SoftLayer_Ticket]] associated with this event.
|
||||
SystemTicketId *int `json:"systemTicketId,omitempty" xmlrpc:"systemTicketId,omitempty"`
|
||||
|
||||
// A count of all updates for this event.
|
||||
UpdateCount *uint `json:"updateCount,omitempty" xmlrpc:"updateCount,omitempty"`
|
||||
|
||||
// All updates for this event.
|
||||
Updates []Notification_Occurrence_Update `json:"updates,omitempty" xmlrpc:"updates,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer events can have have files attached to them by a SoftLayer employee. Attaching a file to a event is a way to provide supplementary information such as a RFO (reason for outage) document or root cause analysis. The SoftLayer_Notification_Occurrence_Event_Attachment data type models a single file attached to a event.
|
||||
type Notification_Occurrence_Event_Attachment struct {
|
||||
Entity
|
||||
|
||||
// The date the file was attached to the event.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The name of the file attached to the event.
|
||||
FileName *string `json:"fileName,omitempty" xmlrpc:"fileName,omitempty"`
|
||||
|
||||
// The size of the file, measured in bytes.
|
||||
FileSize *string `json:"fileSize,omitempty" xmlrpc:"fileSize,omitempty"`
|
||||
|
||||
// A event attachments' unique identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationOccurrenceEvent *Notification_Occurrence_Event `json:"notificationOccurrenceEvent,omitempty" xmlrpc:"notificationOccurrenceEvent,omitempty"`
|
||||
|
||||
// The unique event identifier that the file is attached to.
|
||||
NotificationOccurrenceEventId *int `json:"notificationOccurrenceEventId,omitempty" xmlrpc:"notificationOccurrenceEventId,omitempty"`
|
||||
}
|
||||
|
||||
// This represents the type of SoftLayer_Notification_Occurrence_Event.
|
||||
type Notification_Occurrence_Event_Type struct {
|
||||
Entity
|
||||
|
||||
// The friendly unique identifier for this event type.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information relating to any hardware or services that may be impacted by a SoftLayer_Notification_Occurrence_Event.
|
||||
type Notification_Occurrence_Resource struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// <<< EOT A label which gives some background as to what piece of
|
||||
FilterLabel *string `json:"filterLabel,omitempty" xmlrpc:"filterLabel,omitempty"`
|
||||
|
||||
// The associated event.
|
||||
NotificationOccurrenceEvent *Notification_Occurrence_Event `json:"notificationOccurrenceEvent,omitempty" xmlrpc:"notificationOccurrenceEvent,omitempty"`
|
||||
|
||||
// <<< EOT The unique identifier for the associated
|
||||
NotificationOccurrenceEventId *int `json:"notificationOccurrenceEventId,omitempty" xmlrpc:"notificationOccurrenceEventId,omitempty"`
|
||||
|
||||
// The physical resource.
|
||||
Resource *Entity `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
|
||||
// <<< EOT The unique identifier for the [[SoftLayer_Account]] associated with
|
||||
ResourceAccountId *int `json:"resourceAccountId,omitempty" xmlrpc:"resourceAccountId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceName *string `json:"resourceName,omitempty" xmlrpc:"resourceName,omitempty"`
|
||||
|
||||
// <<< EOT The unique identifier for the physical resource that is associated
|
||||
ResourceTableId *int `json:"resourceTableId,omitempty" xmlrpc:"resourceTableId,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Hardware]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Hardware struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PublicIp *string `json:"publicIp,omitempty" xmlrpc:"publicIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Application_Delivery_Controller]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Application_Delivery_Controller struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PublicIp *string `json:"publicIp,omitempty" xmlrpc:"publicIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PublicIp *string `json:"publicIp,omitempty" xmlrpc:"publicIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Storage_Iscsi_EqualLogic]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Storage_Iscsi_EqualLogic struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Storage_Iscsi_NetApp]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Storage_Iscsi_NetApp struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Storage_Lockbox]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Storage_Lockbox struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Storage_Nas]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Storage_Nas struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Network_Storage_NetApp_Volume]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Network_Storage_NetApp_Volume struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information related to a [[SoftLayer_Virtual_Guest]] resource that is impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_Resource_Virtual struct {
|
||||
Notification_Occurrence_Resource
|
||||
|
||||
// no documentation yet
|
||||
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PrivateIp *string `json:"privateIp,omitempty" xmlrpc:"privateIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PublicIp *string `json:"publicIp,omitempty" xmlrpc:"publicIp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceType *string `json:"resourceType,omitempty" xmlrpc:"resourceType,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Occurrence_Status_Code struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Occurrence_Update struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Contents *string `json:"contents,omitempty" xmlrpc:"contents,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Employee *User_Employee `json:"employee,omitempty" xmlrpc:"employee,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationOccurrenceEvent *Notification_Occurrence_Event `json:"notificationOccurrenceEvent,omitempty" xmlrpc:"notificationOccurrenceEvent,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
}
|
||||
|
||||
// This type contains general information relating to a user that may be impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_User struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AcknowledgedFlag *int `json:"acknowledgedFlag,omitempty" xmlrpc:"acknowledgedFlag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of a collection of resources impacted by the associated event.
|
||||
ImpactedResourceCount *uint `json:"impactedResourceCount,omitempty" xmlrpc:"impactedResourceCount,omitempty"`
|
||||
|
||||
// A collection of resources impacted by the associated event.
|
||||
ImpactedResources []Notification_Occurrence_Resource `json:"impactedResources,omitempty" xmlrpc:"impactedResources,omitempty"`
|
||||
|
||||
// The associated event.
|
||||
NotificationOccurrenceEvent *Notification_Occurrence_Event `json:"notificationOccurrenceEvent,omitempty" xmlrpc:"notificationOccurrenceEvent,omitempty"`
|
||||
|
||||
// The impacted user.
|
||||
User *User_Customer `json:"user,omitempty" xmlrpc:"user,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
UsrRecordId *int `json:"usrRecordId,omitempty" xmlrpc:"usrRecordId,omitempty"`
|
||||
}
|
||||
|
||||
// Retrieve details for preferences. Preferences are used to allow the subscriber to modify their subscription in various ways. Details such as friendly name, keyname maximum and minimum values can be retrieved. These provide details to help configure subscriber preferences correctly.
|
||||
type Notification_Preference struct {
|
||||
Entity
|
||||
|
||||
// A description of what the preference is used for.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Unique identifier for the notification preference.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name that can be used by external systems to refer to preference.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// Largest value allowed for the preference.
|
||||
MaximumValue *string `json:"maximumValue,omitempty" xmlrpc:"maximumValue,omitempty"`
|
||||
|
||||
// Smallest value allowed for the preference.
|
||||
MinimumValue *string `json:"minimumValue,omitempty" xmlrpc:"minimumValue,omitempty"`
|
||||
|
||||
// Friendly name for the notification.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The unit of measure used for the preference's value, minimum and maximum as well.
|
||||
Units *string `json:"units,omitempty" xmlrpc:"units,omitempty"`
|
||||
|
||||
// Default value used when setting up preferences for a new subscriber.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Subscriber struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A count of
|
||||
DeliveryMethodCount *uint `json:"deliveryMethodCount,omitempty" xmlrpc:"deliveryMethodCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
DeliveryMethods []Notification_Subscriber_Delivery_Method `json:"deliveryMethods,omitempty" xmlrpc:"deliveryMethods,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Notification *Notification `json:"notification,omitempty" xmlrpc:"notification,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationId *int `json:"notificationId,omitempty" xmlrpc:"notificationId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationSubscriberTypeId *int `json:"notificationSubscriberTypeId,omitempty" xmlrpc:"notificationSubscriberTypeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationSubscriberTypeResourceId *int `json:"notificationSubscriberTypeResourceId,omitempty" xmlrpc:"notificationSubscriberTypeResourceId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Subscriber_Customer struct {
|
||||
Notification_Subscriber
|
||||
|
||||
// no documentation yet
|
||||
SubscriberRecord *User_Customer `json:"subscriberRecord,omitempty" xmlrpc:"subscriberRecord,omitempty"`
|
||||
}
|
||||
|
||||
// Provides details for the subscriber's delivery methods.
|
||||
type Notification_Subscriber_Delivery_Method struct {
|
||||
Entity
|
||||
|
||||
// Indicates the subscriber's delivery method availability for notifications.
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// Date the subscriber's delivery method was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// Date the subscriber's delivery method was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationDeliveryMethod *Notification_Delivery_Method `json:"notificationDeliveryMethod,omitempty" xmlrpc:"notificationDeliveryMethod,omitempty"`
|
||||
|
||||
// Identifier for the notification delivery method.
|
||||
NotificationDeliveryMethodId *int `json:"notificationDeliveryMethodId,omitempty" xmlrpc:"notificationDeliveryMethodId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NotificationSubscriber *Notification_Subscriber `json:"notificationSubscriber,omitempty" xmlrpc:"notificationSubscriber,omitempty"`
|
||||
|
||||
// Identifier for the subscriber.
|
||||
NotificationSubscriberId *int `json:"notificationSubscriberId,omitempty" xmlrpc:"notificationSubscriberId,omitempty"`
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber struct {
|
||||
Entity
|
||||
|
||||
// The current status of the subscription.
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// A count of the delivery methods used to send the subscribed notification.
|
||||
DeliveryMethodCount *uint `json:"deliveryMethodCount,omitempty" xmlrpc:"deliveryMethodCount,omitempty"`
|
||||
|
||||
// The delivery methods used to send the subscribed notification.
|
||||
DeliveryMethods []Notification_Delivery_Method `json:"deliveryMethods,omitempty" xmlrpc:"deliveryMethods,omitempty"`
|
||||
|
||||
// Unique identifier of the subscriber that will receive the alerts.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Notification subscribed to.
|
||||
Notification *Notification `json:"notification,omitempty" xmlrpc:"notification,omitempty"`
|
||||
|
||||
// Unique identifier of the notification subscribed to.
|
||||
NotificationId *int `json:"notificationId,omitempty" xmlrpc:"notificationId,omitempty"`
|
||||
|
||||
// A count of associated subscriber preferences used for the notification subscription. For example, preferences include number of deliveries (limit) and threshold.
|
||||
PreferenceCount *uint `json:"preferenceCount,omitempty" xmlrpc:"preferenceCount,omitempty"`
|
||||
|
||||
// Associated subscriber preferences used for the notification subscription. For example, preferences include number of deliveries (limit) and threshold.
|
||||
Preferences []Notification_User_Subscriber_Preference `json:"preferences,omitempty" xmlrpc:"preferences,omitempty"`
|
||||
|
||||
// A count of preference details such as description, minimum and maximum limits, default value and unit of measure.
|
||||
PreferencesDetailCount *uint `json:"preferencesDetailCount,omitempty" xmlrpc:"preferencesDetailCount,omitempty"`
|
||||
|
||||
// Preference details such as description, minimum and maximum limits, default value and unit of measure.
|
||||
PreferencesDetails []Notification_Preference `json:"preferencesDetails,omitempty" xmlrpc:"preferencesDetails,omitempty"`
|
||||
|
||||
// The subscriber id to resource id mapping.
|
||||
ResourceRecord *Notification_User_Subscriber_Resource `json:"resourceRecord,omitempty" xmlrpc:"resourceRecord,omitempty"`
|
||||
|
||||
// User record for the subscription.
|
||||
UserRecord *User_Customer `json:"userRecord,omitempty" xmlrpc:"userRecord,omitempty"`
|
||||
|
||||
// Unique identifier of the user the subscription is for.
|
||||
UserRecordId *int `json:"userRecordId,omitempty" xmlrpc:"userRecordId,omitempty"`
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber_Billing struct {
|
||||
Notification_User_Subscriber
|
||||
}
|
||||
|
||||
// Provides mapping details of how the subscriber's notification will be delivered. This maps the subscriber's id with all the delivery method ids used to delivery the notification.
|
||||
type Notification_User_Subscriber_Delivery_Method struct {
|
||||
Entity
|
||||
|
||||
// Determines if the delivery method is active for the user.
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// Provides details for the method used to deliver the notification (email, sms, ticket).
|
||||
DeliveryMethod *Notification_Delivery_Method `json:"deliveryMethod,omitempty" xmlrpc:"deliveryMethod,omitempty"`
|
||||
|
||||
// Unique identifier of the method used to deliver notification.
|
||||
NotificationMethodId *int `json:"notificationMethodId,omitempty" xmlrpc:"notificationMethodId,omitempty"`
|
||||
|
||||
// The Subscriber information tied to the delivery method.
|
||||
NotificationUserSubscriber *Notification_User_Subscriber `json:"notificationUserSubscriber,omitempty" xmlrpc:"notificationUserSubscriber,omitempty"`
|
||||
|
||||
// Unique identifier of the subscriber tied to the delivery method.
|
||||
NotificationUserSubscriberId *int `json:"notificationUserSubscriberId,omitempty" xmlrpc:"notificationUserSubscriberId,omitempty"`
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber_Mobile struct {
|
||||
Notification_User_Subscriber
|
||||
}
|
||||
|
||||
// Preferences are settings that can be modified to change the behavior of the subscription. For example, modify the limit preference to only receive notifications 10 times instead of 1 during a billing cycle.
|
||||
//
|
||||
// NOTE: Some preferences have certain restrictions on values that can be set.
|
||||
type Notification_User_Subscriber_Preference struct {
|
||||
Entity
|
||||
|
||||
// Details such name, keyname, minimum and maximum values for the preference.
|
||||
DefaultPreference *Notification_Preference `json:"defaultPreference,omitempty" xmlrpc:"defaultPreference,omitempty"`
|
||||
|
||||
// Unique identifier for the subscriber's preferences.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Unique identifier of the default preference for which the subscriber preference is based on. For example, if no preferences are supplied during the creation of a subscriber. The default values are pulled using this property.
|
||||
NotificationPreferenceId *int `json:"notificationPreferenceId,omitempty" xmlrpc:"notificationPreferenceId,omitempty"`
|
||||
|
||||
// Details of the subscriber tied to the preference.
|
||||
NotificationUserSubscriber *Notification_User_Subscriber `json:"notificationUserSubscriber,omitempty" xmlrpc:"notificationUserSubscriber,omitempty"`
|
||||
|
||||
// Unique identifier of the subscriber tied to the subscriber preference.
|
||||
NotificationUserSubscriberId *int `json:"notificationUserSubscriberId,omitempty" xmlrpc:"notificationUserSubscriberId,omitempty"`
|
||||
|
||||
// The user supplied value to "override" the "default" preference's value.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Retrieve identifier cross-reference information. SoftLayer_Notification_User_Subscriber_Resource provides the resource table id and subscriber id relation. The resource table id is the id of the service the subscriber receives alerts for. This resource table id could be the unique identifier for a Storage Evault service, Global Load Balancer or CDN service.
|
||||
type Notification_User_Subscriber_Resource struct {
|
||||
Entity
|
||||
|
||||
// The Subscriber information tied to the resource service.
|
||||
NotificationUserSubscriber *Notification_User_Subscriber `json:"notificationUserSubscriber,omitempty" xmlrpc:"notificationUserSubscriber,omitempty"`
|
||||
|
||||
// Unique identifier of the subscriber that will receive the alerts for the resource subscribed to a notification.
|
||||
NotificationUserSubscriberId *int `json:"notificationUserSubscriberId,omitempty" xmlrpc:"notificationUserSubscriberId,omitempty"`
|
||||
|
||||
// Unique identifier for a SoftLayer service that is subscribed to a notification. Currently, the SoftLayer services that can be subscribed to notifications are:
|
||||
//
|
||||
// Storage EVault CDN Global Load Balancer
|
||||
//
|
||||
//
|
||||
ResourceTableId *int `json:"resourceTableId,omitempty" xmlrpc:"resourceTableId,omitempty"`
|
||||
}
|
1836
vendor/github.com/softlayer/softlayer-go/datatypes/product.go
generated
vendored
Normal file
1836
vendor/github.com/softlayer/softlayer-go/datatypes/product.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
303
vendor/github.com/softlayer/softlayer-go/datatypes/provisioning.go
generated
vendored
Normal file
303
vendor/github.com/softlayer/softlayer-go/datatypes/provisioning.go
generated
vendored
Normal file
|
@ -0,0 +1,303 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Provisioning_Hook contains all the information needed to add a hook into a server/Virtual provision and os reload.
|
||||
type Provisioning_Hook struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The ID of the account the script belongs to.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
HookType *Provisioning_Hook_Type `json:"hookType,omitempty" xmlrpc:"hookType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The name of the hook.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The ID of the type of hook the script is identified as. Currently only CUSTOMER_PROVIDED_HOOK has been implemented.
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
|
||||
// The endpoint that the script will be downloaded from (USERNAME AND PASSWORD SHOULD BE INCLUDED HERE). If the endpoint is HTTP, the script will only be downloaded. If the endpoint is HTTPS, the script will be downloaded and executed.
|
||||
Uri *string `json:"uri,omitempty" xmlrpc:"uri,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Hook_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Classification represent a maintenance type for the specific hardware maintenance desired.
|
||||
type Provisioning_Maintenance_Classification struct {
|
||||
Entity
|
||||
|
||||
// The id of the maintenance classification.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ItemCategories []Provisioning_Maintenance_Classification_Item_Category `json:"itemCategories,omitempty" xmlrpc:"itemCategories,omitempty"`
|
||||
|
||||
// A count of
|
||||
ItemCategoryCount *uint `json:"itemCategoryCount,omitempty" xmlrpc:"itemCategoryCount,omitempty"`
|
||||
|
||||
// The number of slots required for the maintenance classification.
|
||||
Slots *int `json:"slots,omitempty" xmlrpc:"slots,omitempty"`
|
||||
|
||||
// The type or name of the maintenance classification.
|
||||
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Maintenance_Classification_Item_Category struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ItemCategoryId *int `json:"itemCategoryId,omitempty" xmlrpc:"itemCategoryId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintenanceClassification *Provisioning_Maintenance_Classification `json:"maintenanceClassification,omitempty" xmlrpc:"maintenanceClassification,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintenanceClassificationId *int `json:"maintenanceClassificationId,omitempty" xmlrpc:"maintenanceClassificationId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Slots represent the available slots for a given maintenance window at a SoftLayer data center.
|
||||
type Provisioning_Maintenance_Slots struct {
|
||||
Entity
|
||||
|
||||
// The available slots for a maintenance window.
|
||||
AvailableSlots *int `json:"availableSlots,omitempty" xmlrpc:"availableSlots,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Maintenance_Ticket struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AvailableSlots *Provisioning_Maintenance_Slots `json:"availableSlots,omitempty" xmlrpc:"availableSlots,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintClassId *int `json:"maintClassId,omitempty" xmlrpc:"maintClassId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintWindowId *int `json:"maintWindowId,omitempty" xmlrpc:"maintWindowId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintenanceClass *Provisioning_Maintenance_Classification `json:"maintenanceClass,omitempty" xmlrpc:"maintenanceClass,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MaintenanceDate *Time `json:"maintenanceDate,omitempty" xmlrpc:"maintenanceDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketId *int `json:"ticketId,omitempty" xmlrpc:"ticketId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Window represent a time window that SoftLayer performs a hardware or software maintenance and upgrades.
|
||||
type Provisioning_Maintenance_Window struct {
|
||||
Entity
|
||||
|
||||
// The date and time a maintenance window is scheduled to begin.
|
||||
BeginDate *Time `json:"beginDate,omitempty" xmlrpc:"beginDate,omitempty"`
|
||||
|
||||
// An ISO-8601 numeric representation of the day of the week that a maintenance window is performed. 1: Monday, 7: Sunday
|
||||
DayOfWeek *int `json:"dayOfWeek,omitempty" xmlrpc:"dayOfWeek,omitempty"`
|
||||
|
||||
// The date and time a maintenance window is scheduled to end.
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// Id of the maintenance window
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// An internal identifier of the location (data center) record that a maintenance window takes place in.
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// An internal identifier of the datacenter timezone.
|
||||
PortalTzId *int `json:"portalTzId,omitempty" xmlrpc:"portalTzId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Version1_Transaction data type contains general information relating to a single SoftLayer hardware transaction.
|
||||
//
|
||||
// SoftLayer customers are unable to change their hardware transactions.
|
||||
type Provisioning_Version1_Transaction struct {
|
||||
Entity
|
||||
|
||||
// The account that a transaction belongs to.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The date a transaction was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The amount of seconds that have elapsed since the transaction was last modified.
|
||||
ElapsedSeconds *int `json:"elapsedSeconds,omitempty" xmlrpc:"elapsedSeconds,omitempty"`
|
||||
|
||||
// The guest record for this transaction.
|
||||
Guest *Virtual_Guest `json:"guest,omitempty" xmlrpc:"guest,omitempty"`
|
||||
|
||||
// A transaction's associated guest identification number.
|
||||
GuestId *int `json:"guestId,omitempty" xmlrpc:"guestId,omitempty"`
|
||||
|
||||
// The hardware object for this transaction.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// A transaction's associated hardware identification number.
|
||||
HardwareId *int `json:"hardwareId,omitempty" xmlrpc:"hardwareId,omitempty"`
|
||||
|
||||
// A transaction's identifying number.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Loopback []Provisioning_Version1_Transaction `json:"loopback,omitempty" xmlrpc:"loopback,omitempty"`
|
||||
|
||||
// A count of
|
||||
LoopbackCount *uint `json:"loopbackCount,omitempty" xmlrpc:"loopbackCount,omitempty"`
|
||||
|
||||
// The date a transaction was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// A count of
|
||||
PendingTransactionCount *uint `json:"pendingTransactionCount,omitempty" xmlrpc:"pendingTransactionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
PendingTransactions []Provisioning_Version1_Transaction `json:"pendingTransactions,omitempty" xmlrpc:"pendingTransactions,omitempty"`
|
||||
|
||||
// The date the transaction status was last modified.
|
||||
StatusChangeDate *Time `json:"statusChangeDate,omitempty" xmlrpc:"statusChangeDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketScheduledActionReference []Ticket_Attachment `json:"ticketScheduledActionReference,omitempty" xmlrpc:"ticketScheduledActionReference,omitempty"`
|
||||
|
||||
// A count of
|
||||
TicketScheduledActionReferenceCount *uint `json:"ticketScheduledActionReferenceCount,omitempty" xmlrpc:"ticketScheduledActionReferenceCount,omitempty"`
|
||||
|
||||
// A transaction's group. This group object determines what type of service is being done on the hardware.
|
||||
TransactionGroup *Provisioning_Version1_Transaction_Group `json:"transactionGroup,omitempty" xmlrpc:"transactionGroup,omitempty"`
|
||||
|
||||
// A transaction's status. This status object determines the state it is in the transaction group.
|
||||
TransactionStatus *Provisioning_Version1_Transaction_Status `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Version1_Transaction_Group data type contains general information relating to a single SoftLayer hardware transaction group.
|
||||
//
|
||||
// SoftLayer customers are unable to change their hardware transactions or the hardware transaction group.
|
||||
type Provisioning_Version1_Transaction_Group struct {
|
||||
Entity
|
||||
|
||||
// Average time, in minutes, for this type of transaction to complete. Please note that this is only an estimate.
|
||||
AverageTimeToComplete *Float64 `json:"averageTimeToComplete,omitempty" xmlrpc:"averageTimeToComplete,omitempty"`
|
||||
|
||||
// A transaction group's name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Version1_Transaction_History struct {
|
||||
Entity
|
||||
|
||||
// The finish date of a transaction history record.
|
||||
FinishDate *Time `json:"finishDate,omitempty" xmlrpc:"finishDate,omitempty"`
|
||||
|
||||
// The guest from where transaction history originates.
|
||||
Guest *Virtual_Guest `json:"guest,omitempty" xmlrpc:"guest,omitempty"`
|
||||
|
||||
// The guest ID associated with a transaction history.
|
||||
GuestId *int `json:"guestId,omitempty" xmlrpc:"guestId,omitempty"`
|
||||
|
||||
// The hardware from where transaction history originates.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// The hardware ID associated with a transaction history.
|
||||
HardwareId *int `json:"hardwareId,omitempty" xmlrpc:"hardwareId,omitempty"`
|
||||
|
||||
// The host ID associated with a transaction history.
|
||||
HostId *int `json:"hostId,omitempty" xmlrpc:"hostId,omitempty"`
|
||||
|
||||
// The ID associated with a transaction history.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The start date of a transaction history record.
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// The transaction from where transaction history originates.
|
||||
Transaction *Provisioning_Version1_Transaction `json:"transaction,omitempty" xmlrpc:"transaction,omitempty"`
|
||||
|
||||
// The transaction ID associated with a transaction history.
|
||||
TransactionId *int `json:"transactionId,omitempty" xmlrpc:"transactionId,omitempty"`
|
||||
|
||||
// The transaction status of a transaction history.
|
||||
TransactionStatus *Provisioning_Version1_Transaction_Status `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
|
||||
// The transaction status ID associated with a transaction history.
|
||||
TransactionStatusId *int `json:"transactionStatusId,omitempty" xmlrpc:"transactionStatusId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Version1_Transaction_Status data type contains general information relating to a single SoftLayer hardware transaction status.
|
||||
//
|
||||
// SoftLayer customers are unable to change their hardware transaction status.
|
||||
type Provisioning_Version1_Transaction_Status struct {
|
||||
Entity
|
||||
|
||||
// Hardware transaction status average duration.
|
||||
AverageDuration *Float64 `json:"averageDuration,omitempty" xmlrpc:"averageDuration,omitempty"`
|
||||
|
||||
// Transaction status friendly name.
|
||||
FriendlyName *string `json:"friendlyName,omitempty" xmlrpc:"friendlyName,omitempty"`
|
||||
|
||||
// Transaction status name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of
|
||||
NonCompletedTransactionCount *uint `json:"nonCompletedTransactionCount,omitempty" xmlrpc:"nonCompletedTransactionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
NonCompletedTransactions []Provisioning_Version1_Transaction `json:"nonCompletedTransactions,omitempty" xmlrpc:"nonCompletedTransactions,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Version1_Transaction_SubnetMigration struct {
|
||||
Provisioning_Version1_Transaction
|
||||
}
|
413
vendor/github.com/softlayer/softlayer-go/datatypes/resource.go
generated
vendored
Normal file
413
vendor/github.com/softlayer/softlayer-go/datatypes/resource.go
generated
vendored
Normal file
|
@ -0,0 +1,413 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Configuration struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group struct {
|
||||
Entity
|
||||
|
||||
// A count of a resource group's associated group ancestors.
|
||||
AncestorGroupCount *uint `json:"ancestorGroupCount,omitempty" xmlrpc:"ancestorGroupCount,omitempty"`
|
||||
|
||||
// A resource group's associated group ancestors.
|
||||
AncestorGroups []Resource_Group `json:"ancestorGroups,omitempty" xmlrpc:"ancestorGroups,omitempty"`
|
||||
|
||||
// A count of a resource group's associated attributes.
|
||||
AttributeCount *uint `json:"attributeCount,omitempty" xmlrpc:"attributeCount,omitempty"`
|
||||
|
||||
// A resource group's associated attributes.
|
||||
Attributes []Resource_Group_Attribute `json:"attributes,omitempty" xmlrpc:"attributes,omitempty"`
|
||||
|
||||
// A resource group's creation date.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A resource group's description.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// A count of a resource group's associated hardware members.
|
||||
HardwareMemberCount *uint `json:"hardwareMemberCount,omitempty" xmlrpc:"hardwareMemberCount,omitempty"`
|
||||
|
||||
// A resource group's associated hardware members.
|
||||
HardwareMembers []Resource_Group_Member `json:"hardwareMembers,omitempty" xmlrpc:"hardwareMembers,omitempty"`
|
||||
|
||||
// A resource group's ID.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A resource group's keyname.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A count of a resource group's associated members.
|
||||
MemberCount *uint `json:"memberCount,omitempty" xmlrpc:"memberCount,omitempty"`
|
||||
|
||||
// A resource group's associated members.
|
||||
Members []Resource_Group_Member `json:"members,omitempty" xmlrpc:"members,omitempty"`
|
||||
|
||||
// A resource group's name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A resource group's associated root resource group.
|
||||
RootResourceGroup *Resource_Group `json:"rootResourceGroup,omitempty" xmlrpc:"rootResourceGroup,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RootResourceGroupId *int `json:"rootResourceGroupId,omitempty" xmlrpc:"rootResourceGroupId,omitempty"`
|
||||
|
||||
// A count of a resource group's associated subnet members.
|
||||
SubnetMemberCount *uint `json:"subnetMemberCount,omitempty" xmlrpc:"subnetMemberCount,omitempty"`
|
||||
|
||||
// A resource group's associated subnet members.
|
||||
SubnetMembers []Resource_Group_Member `json:"subnetMembers,omitempty" xmlrpc:"subnetMembers,omitempty"`
|
||||
|
||||
// A resource group's associated template.
|
||||
Template *Resource_Group_Template `json:"template,omitempty" xmlrpc:"template,omitempty"`
|
||||
|
||||
// A resource group's template ID.
|
||||
TemplateId *int `json:"templateId,omitempty" xmlrpc:"templateId,omitempty"`
|
||||
|
||||
// A count of a resource group's associated VLAN members.
|
||||
VlanMemberCount *uint `json:"vlanMemberCount,omitempty" xmlrpc:"vlanMemberCount,omitempty"`
|
||||
|
||||
// A resource group's associated VLAN members.
|
||||
VlanMembers []Resource_Group_Member `json:"vlanMembers,omitempty" xmlrpc:"vlanMembers,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Attribute struct {
|
||||
Entity
|
||||
|
||||
// A resource group attribute's creation date.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A resource group attribute's resource group.
|
||||
Group *Resource_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// A resource group attribute's ID.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A resource group attribute's type.
|
||||
Type *Resource_Group_Attribute_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// A resource group attribute's value.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Attribute_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Resource_Group_Descendant_Reference data type simplifies the link between one SoftLayer_Resource_Group_Member object and all of its parents.
|
||||
//
|
||||
//
|
||||
type Resource_Group_Descendant_Reference struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Group *Resource_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
GroupMember *Resource_Group_Member `json:"groupMember,omitempty" xmlrpc:"groupMember,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member struct {
|
||||
Entity
|
||||
|
||||
// A count of a resource group member's associated attributes.
|
||||
AttributeCount *uint `json:"attributeCount,omitempty" xmlrpc:"attributeCount,omitempty"`
|
||||
|
||||
// A resource group member's associated attributes.
|
||||
Attributes []Resource_Group_Member_Attribute `json:"attributes,omitempty" xmlrpc:"attributes,omitempty"`
|
||||
|
||||
// A resource group member's creation date.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A count of a resource group member's associated member descendants.
|
||||
DescendantMemberCount *uint `json:"descendantMemberCount,omitempty" xmlrpc:"descendantMemberCount,omitempty"`
|
||||
|
||||
// A resource group member's associated member descendants.
|
||||
DescendantMembers []Resource_Group_Member `json:"descendantMembers,omitempty" xmlrpc:"descendantMembers,omitempty"`
|
||||
|
||||
// A resource group member's resource group.
|
||||
Group *Resource_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// A resource group member's ID.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of a resource group member's associated roles.
|
||||
RoleCount *uint `json:"roleCount,omitempty" xmlrpc:"roleCount,omitempty"`
|
||||
|
||||
// A resource group member's associated roles.
|
||||
Roles []Resource_Group_Role `json:"roles,omitempty" xmlrpc:"roles,omitempty"`
|
||||
|
||||
// A resource group member's status.
|
||||
Status *string `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// A resource group member's type.
|
||||
Type *Resource_Group_Member_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Attribute struct {
|
||||
Entity
|
||||
|
||||
// A resource group member attribute's creation date.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A resource group member attribute's ID.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A resource group member attribute's resource group member.
|
||||
Member *Resource_Group_Member `json:"member,omitempty" xmlrpc:"member,omitempty"`
|
||||
|
||||
// A resource group member attribute's type.
|
||||
Type *Resource_Group_Member_Attribute_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// A resource group member attribute's value.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Attribute_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_CloudStack_Version3_Cluster struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated cluster.
|
||||
Resource *Resource_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_CloudStack_Version3_Pod struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated pod.
|
||||
Resource *Resource_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_CloudStack_Version3_Zone struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated zone.
|
||||
Resource *Resource_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Hardware struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated hardware.
|
||||
Resource *Hardware `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server arbiter-only state.
|
||||
ServerArbiterOnly *Resource_Group_Member_Attribute `json:"serverArbiterOnly,omitempty" xmlrpc:"serverArbiterOnly,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server hidden state.
|
||||
ServerHidden *Resource_Group_Member_Attribute `json:"serverHidden,omitempty" xmlrpc:"serverHidden,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server priority.
|
||||
ServerPriority *Resource_Group_Member_Attribute `json:"serverPriority,omitempty" xmlrpc:"serverPriority,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server slave delay (in seconds).
|
||||
ServerSlaveDelay *Resource_Group_Member_Attribute `json:"serverSlaveDelay,omitempty" xmlrpc:"serverSlaveDelay,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server tags (in JSON format).
|
||||
ServerTags *Resource_Group_Member_Attribute `json:"serverTags,omitempty" xmlrpc:"serverTags,omitempty"`
|
||||
|
||||
// A resource group hardware member's associated server vote count.
|
||||
ServerVotes *Resource_Group_Member_Attribute `json:"serverVotes,omitempty" xmlrpc:"serverVotes,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Network_Storage struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated network storage.
|
||||
Resource *Network_Storage `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Network_Subnet struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated network subnet.
|
||||
Resource *Network_Subnet `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Network_Vlan struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated network VLAN.
|
||||
Resource *Network_Vlan `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Resource_Group struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated resource group.
|
||||
Resource *Resource_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Role_Link struct {
|
||||
Entity
|
||||
|
||||
// A resource group member's ID.
|
||||
GroupMemberId *int `json:"groupMemberId,omitempty" xmlrpc:"groupMemberId,omitempty"`
|
||||
|
||||
// A resource group's template role ID.
|
||||
GroupTemplateRoleId *int `json:"groupTemplateRoleId,omitempty" xmlrpc:"groupTemplateRoleId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Software_Component_Password struct {
|
||||
Resource_Group_Member
|
||||
|
||||
// A resource group member's associated software component password.
|
||||
Resource *Software_Component_Password `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Type struct {
|
||||
Entity
|
||||
|
||||
// A resource group member's type description.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// A resource group member's type keyname.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Member_Virtual_Host_Pool struct {
|
||||
Resource_Group_Member
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Role struct {
|
||||
Entity
|
||||
|
||||
// A resource group role's description.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// A resource group role's ID.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A resource group role's keyname.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A count of a resource group's role.
|
||||
MemberLinkCount *uint `json:"memberLinkCount,omitempty" xmlrpc:"memberLinkCount,omitempty"`
|
||||
|
||||
// A resource group's role.
|
||||
MemberLinks []Resource_Group_Member_Role_Link `json:"memberLinks,omitempty" xmlrpc:"memberLinks,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Template struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Children []Resource_Group_Template `json:"children,omitempty" xmlrpc:"children,omitempty"`
|
||||
|
||||
// A count of
|
||||
ChildrenCount *uint `json:"childrenCount,omitempty" xmlrpc:"childrenCount,omitempty"`
|
||||
|
||||
// A resource group template's description.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A resource group template's keyname.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A count of
|
||||
MemberCount *uint `json:"memberCount,omitempty" xmlrpc:"memberCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Members []Resource_Group_Template_Member `json:"members,omitempty" xmlrpc:"members,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Package *Product_Package `json:"package,omitempty" xmlrpc:"package,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Template_Member struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
MaxQuantity *int `json:"maxQuantity,omitempty" xmlrpc:"maxQuantity,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
MinQuantity *int `json:"minQuantity,omitempty" xmlrpc:"minQuantity,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Role *Resource_Group_Role `json:"role,omitempty" xmlrpc:"role,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
RoleId *int `json:"roleId,omitempty" xmlrpc:"roleId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Template *Resource_Group_Template `json:"template,omitempty" xmlrpc:"template,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TemplateId *int `json:"templateId,omitempty" xmlrpc:"templateId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Metadata struct {
|
||||
Entity
|
||||
}
|
62
vendor/github.com/softlayer/softlayer-go/datatypes/sales.go
generated
vendored
Normal file
62
vendor/github.com/softlayer/softlayer-go/datatypes/sales.go
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The presale event data types indicate the information regarding an individual presale event. The '''locationId''' will indicate the datacenter associated with the presale event. The '''itemId''' will indicate the product item associated with a particular presale event - however these are more rare. The '''startDate''' and '''endDate''' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned.
|
||||
type Sales_Presale_Event struct {
|
||||
Entity
|
||||
|
||||
// A flag to indicate that the presale event is currently active. A presale event is active if the current time is between the start and end dates.
|
||||
ActiveFlag *bool `json:"activeFlag,omitempty" xmlrpc:"activeFlag,omitempty"`
|
||||
|
||||
// Description of the presale event.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// End date of the presale event. Orders can be approved and provisioned after this date.
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date.
|
||||
ExpiredFlag *bool `json:"expiredFlag,omitempty" xmlrpc:"expiredFlag,omitempty"`
|
||||
|
||||
// Presale event unique identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The [[SoftLayer_Product_Item]] associated with the presale event.
|
||||
Item *Product_Item `json:"item,omitempty" xmlrpc:"item,omitempty"`
|
||||
|
||||
// [[SoftLayer_Product_Item]] id associated with the presale event.
|
||||
ItemId *int `json:"itemId,omitempty" xmlrpc:"itemId,omitempty"`
|
||||
|
||||
// The [[SoftLayer_Location]] associated with the presale event.
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// [[SoftLayer_Location]] id for the presale event.
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// A count of the orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
|
||||
OrderCount *uint `json:"orderCount,omitempty" xmlrpc:"orderCount,omitempty"`
|
||||
|
||||
// The orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
|
||||
Orders []Billing_Order `json:"orders,omitempty" xmlrpc:"orders,omitempty"`
|
||||
|
||||
// Start date of the presale event. Orders cannot be approved before this date.
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
}
|
559
vendor/github.com/softlayer/softlayer-go/datatypes/scale.go
generated
vendored
Normal file
559
vendor/github.com/softlayer/softlayer-go/datatypes/scale.go
generated
vendored
Normal file
|
@ -0,0 +1,559 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Asset struct {
|
||||
Entity
|
||||
|
||||
// When this asset was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// An asset's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The group this asset belongs to.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this asset belongs to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Asset_Hardware struct {
|
||||
Scale_Asset
|
||||
|
||||
// The hardware for this asset.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// The identifier of the hardware for this asset.
|
||||
HardwareId *int `json:"hardwareId,omitempty" xmlrpc:"hardwareId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Asset_Virtual_Guest struct {
|
||||
Scale_Asset
|
||||
|
||||
// The guest for this asset.
|
||||
VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"`
|
||||
|
||||
// The identifier of the guest for this asset.
|
||||
VirtualGuestId *int `json:"virtualGuestId,omitempty" xmlrpc:"virtualGuestId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Group struct {
|
||||
Entity
|
||||
|
||||
// The account for this scaling group.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The identifier of the account assigned to this group.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// If this is true, this group will scale down members in a way to preserve the balance across VLANs. If there is ambiguity about which member to use to maintain balance, the terminationPolicy is used to resolve it. This is false by default and can only be set to true if there are multiple VLANs that are being balanced across.
|
||||
BalancedTerminationFlag *bool `json:"balancedTerminationFlag,omitempty" xmlrpc:"balancedTerminationFlag,omitempty"`
|
||||
|
||||
// The number of seconds this group will wait after lastActionDate before performing another action. Be advised, this can be overridden per policy. While strongly discouraged, a value of 0 effectively disables cooldown.
|
||||
Cooldown *int `json:"cooldown,omitempty" xmlrpc:"cooldown,omitempty"`
|
||||
|
||||
// When this group was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// This value is only available on the template for creating and editing a group. It will be null when retrieved. When this value is provided on create or edit, guests will be scaled up or down to meet this number. This number must be in the range provided by minimumMemberCount and maximumMemberCount. This value can only be present during create or edit when this group is active. Note, guests that are created as a result of this value can possibly be removed after cooldown by a policy.
|
||||
DesiredMemberCount *int `json:"desiredMemberCount,omitempty" xmlrpc:"desiredMemberCount,omitempty"`
|
||||
|
||||
// A group's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The date of the last action on this group or its create date
|
||||
LastActionDate *Time `json:"lastActionDate,omitempty" xmlrpc:"lastActionDate,omitempty"`
|
||||
|
||||
// A count of collection of load balancers for this auto scale group.
|
||||
LoadBalancerCount *uint `json:"loadBalancerCount,omitempty" xmlrpc:"loadBalancerCount,omitempty"`
|
||||
|
||||
// Collection of load balancers for this auto scale group.
|
||||
LoadBalancers []Scale_LoadBalancer `json:"loadBalancers,omitempty" xmlrpc:"loadBalancers,omitempty"`
|
||||
|
||||
// A count of collection of log entries for this group.
|
||||
LogCount *uint `json:"logCount,omitempty" xmlrpc:"logCount,omitempty"`
|
||||
|
||||
// Collection of log entries for this group.
|
||||
Logs []Scale_Group_Log `json:"logs,omitempty" xmlrpc:"logs,omitempty"`
|
||||
|
||||
// The greatest number of virtual guest members that are allowed on this group. Any attempts to add a guest member will fail if it will result in the total guest member count of this group to be above this number. If this number is edited and is less than the current guest member count, guests will be removed to at least be no greater than this number.
|
||||
MaximumMemberCount *int `json:"maximumMemberCount,omitempty" xmlrpc:"maximumMemberCount,omitempty"`
|
||||
|
||||
// The fewest number of virtual guest members that are allowed on this group. Any attempts to remove a guest member will fail if it will result in the total guest member count of this group to be below this number. If this number is edited and is larger than the current guest member count, guests will be added to at least reach this number.
|
||||
MinimumMemberCount *int `json:"minimumMemberCount,omitempty" xmlrpc:"minimumMemberCount,omitempty"`
|
||||
|
||||
// When this group was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The name of this scale group. It must be unique on the account.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of collection of VLANs for this auto scale group. VLANs are optional. This can contain a public or private VLAN or both. When a single VLAN for a public/private type is given it can be a non-purchased VLAN only if the minimumMemberCount on the group is >= 1. This can also contain any number of public/private purchased VLANs and members are staggered across them when scaled up.
|
||||
NetworkVlanCount *uint `json:"networkVlanCount,omitempty" xmlrpc:"networkVlanCount,omitempty"`
|
||||
|
||||
// Collection of VLANs for this auto scale group. VLANs are optional. This can contain a public or private VLAN or both. When a single VLAN for a public/private type is given it can be a non-purchased VLAN only if the minimumMemberCount on the group is >= 1. This can also contain any number of public/private purchased VLANs and members are staggered across them when scaled up.
|
||||
NetworkVlans []Scale_Network_Vlan `json:"networkVlans,omitempty" xmlrpc:"networkVlans,omitempty"`
|
||||
|
||||
// Collection of policies for this group. This can be empty.
|
||||
Policies []Scale_Policy `json:"policies,omitempty" xmlrpc:"policies,omitempty"`
|
||||
|
||||
// A count of collection of policies for this group. This can be empty.
|
||||
PolicyCount *uint `json:"policyCount,omitempty" xmlrpc:"policyCount,omitempty"`
|
||||
|
||||
// The regional group for this scale group.
|
||||
RegionalGroup *Location_Group_Regional `json:"regionalGroup,omitempty" xmlrpc:"regionalGroup,omitempty"`
|
||||
|
||||
// The identifier of the regional group this scaling group is assigned to.
|
||||
RegionalGroupId *int `json:"regionalGroupId,omitempty" xmlrpc:"regionalGroupId,omitempty"`
|
||||
|
||||
// The status for this scale group.
|
||||
Status *Scale_Group_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// If true, this group is suspended.
|
||||
SuspendedFlag *bool `json:"suspendedFlag,omitempty" xmlrpc:"suspendedFlag,omitempty"`
|
||||
|
||||
// The termination policy for this scaling group.
|
||||
TerminationPolicy *Scale_Termination_Policy `json:"terminationPolicy,omitempty" xmlrpc:"terminationPolicy,omitempty"`
|
||||
|
||||
// The termination policy for the group. This determines which member to choose to delete when scaling downwards.
|
||||
TerminationPolicyId *int `json:"terminationPolicyId,omitempty" xmlrpc:"terminationPolicyId,omitempty"`
|
||||
|
||||
// A count of collection of guests that have been pinned to this group. Guest assets are only used for certain trigger checks such as resource watches. They do not count towards the auto scaling guest counts of this group in anyway and are never automatically added or removed.
|
||||
VirtualGuestAssetCount *uint `json:"virtualGuestAssetCount,omitempty" xmlrpc:"virtualGuestAssetCount,omitempty"`
|
||||
|
||||
// Collection of guests that have been pinned to this group. Guest assets are only used for certain trigger checks such as resource watches. They do not count towards the auto scaling guest counts of this group in anyway and are never automatically added or removed.
|
||||
VirtualGuestAssets []Scale_Asset_Virtual_Guest `json:"virtualGuestAssets,omitempty" xmlrpc:"virtualGuestAssets,omitempty"`
|
||||
|
||||
// A count of collection of guests that have been scaled with the group. When this group is active, the count of guests here is guaranteed to be between minimumMemberCount and maximumMemberCount inclusively.
|
||||
VirtualGuestMemberCount *uint `json:"virtualGuestMemberCount,omitempty" xmlrpc:"virtualGuestMemberCount,omitempty"`
|
||||
|
||||
// This is the template to create guest members with. This is the same template accepted by the createObject call on SoftLayer_Virtual_Guest with some caveats. The hostname provided will have an arbitrary value appended to it for each guest created. Also, hourlyBillingFlag cannot be false, and if the datacenter is provided it must be in the region of this group. Finally, VLANs cannot be provided for the template, it will use VLANs provided to this group instead.
|
||||
//
|
||||
// Note, if this template is edited on an existing group the previous template values are not kept and are not considered during termination. This means a group's guest members could effectively be a hybrid of multiple templates because this value was changed after some guest members were created but before others were created.
|
||||
VirtualGuestMemberTemplate *Virtual_Guest `json:"virtualGuestMemberTemplate,omitempty" xmlrpc:"virtualGuestMemberTemplate,omitempty"`
|
||||
|
||||
// Collection of guests that have been scaled with the group. When this group is active, the count of guests here is guaranteed to be between minimumMemberCount and maximumMemberCount inclusively.
|
||||
VirtualGuestMembers []Scale_Member_Virtual_Guest `json:"virtualGuestMembers,omitempty" xmlrpc:"virtualGuestMembers,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Group_Log struct {
|
||||
Entity
|
||||
|
||||
// When this event occurred.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A textual description of what happened during this action.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// This log's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The group this log refers to.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this log refers to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Group_Status struct {
|
||||
Entity
|
||||
|
||||
// A status's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A status's programmatic name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A status's human-friendly name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_LoadBalancer struct {
|
||||
Entity
|
||||
|
||||
// The percentage of connections allocated to this virtual server.
|
||||
AllocationPercent *int `json:"allocationPercent,omitempty" xmlrpc:"allocationPercent,omitempty"`
|
||||
|
||||
// When this load balancer configuration was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// The health check for this configuration.
|
||||
HealthCheck *Network_Application_Delivery_Controller_LoadBalancer_Health_Check `json:"healthCheck,omitempty" xmlrpc:"healthCheck,omitempty"`
|
||||
|
||||
// The identifier for the health check of this load balancer configuration
|
||||
HealthCheckId *int `json:"healthCheckId,omitempty" xmlrpc:"healthCheckId,omitempty"`
|
||||
|
||||
// The load balancer configuration's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// When this load balancer configuration was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The port for this load balancer configuration.
|
||||
Port *int `json:"port,omitempty" xmlrpc:"port,omitempty"`
|
||||
|
||||
// The routing method.
|
||||
RoutingMethod *Network_Application_Delivery_Controller_LoadBalancer_Routing_Method `json:"routingMethod,omitempty" xmlrpc:"routingMethod,omitempty"`
|
||||
|
||||
// The routing type.
|
||||
RoutingType *Network_Application_Delivery_Controller_LoadBalancer_Routing_Type `json:"routingType,omitempty" xmlrpc:"routingType,omitempty"`
|
||||
|
||||
// The group this load balancer configuration is for.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this load balancer configuration applies to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
|
||||
// The ID of the virtual IP address.
|
||||
VirtualIpAddressId *int `json:"virtualIpAddressId,omitempty" xmlrpc:"virtualIpAddressId,omitempty"`
|
||||
|
||||
// The virtual server for this configuration.
|
||||
VirtualServer *Network_Application_Delivery_Controller_LoadBalancer_VirtualServer `json:"virtualServer,omitempty" xmlrpc:"virtualServer,omitempty"`
|
||||
|
||||
// The identifier of the virtual server this load balancer configuration uses.
|
||||
VirtualServerId *int `json:"virtualServerId,omitempty" xmlrpc:"virtualServerId,omitempty"`
|
||||
|
||||
// The port on the virtual server.
|
||||
VirtualServerPort *int `json:"virtualServerPort,omitempty" xmlrpc:"virtualServerPort,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Member struct {
|
||||
Entity
|
||||
|
||||
// When this member was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A member's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The group this member belongs to.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this member belongs to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Member_Virtual_Guest struct {
|
||||
Scale_Member
|
||||
|
||||
// The guest for this member.
|
||||
VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"`
|
||||
|
||||
// The identifier of the guest for this member.
|
||||
VirtualGuestId *int `json:"virtualGuestId,omitempty" xmlrpc:"virtualGuestId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Network_Vlan struct {
|
||||
Entity
|
||||
|
||||
// When this network VLAN reference was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// The network VLAN reference's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The network VLAN to scale with.
|
||||
NetworkVlan *Network_Vlan `json:"networkVlan,omitempty" xmlrpc:"networkVlan,omitempty"`
|
||||
|
||||
// The identifier for the VLAN to scale with.
|
||||
NetworkVlanId *int `json:"networkVlanId,omitempty" xmlrpc:"networkVlanId,omitempty"`
|
||||
|
||||
// The group this network VLAN is for.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this network VLAN reference applies to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy struct {
|
||||
Entity
|
||||
|
||||
// A count of the actions to perform upon any trigger hit. Currently this must be a single value.
|
||||
ActionCount *uint `json:"actionCount,omitempty" xmlrpc:"actionCount,omitempty"`
|
||||
|
||||
// The actions to perform upon any trigger hit. Currently this must be a single value.
|
||||
Actions []Scale_Policy_Action `json:"actions,omitempty" xmlrpc:"actions,omitempty"`
|
||||
|
||||
// The number of seconds this policy will wait after lastActionDate on group before performing another action. If not present, the group's cooldown value is used.
|
||||
Cooldown *int `json:"cooldown,omitempty" xmlrpc:"cooldown,omitempty"`
|
||||
|
||||
// When this policy was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// A policy's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// When this policy was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The name of this policy. It must be unique within the group.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of the one-time triggers to check for this group.
|
||||
OneTimeTriggerCount *uint `json:"oneTimeTriggerCount,omitempty" xmlrpc:"oneTimeTriggerCount,omitempty"`
|
||||
|
||||
// The one-time triggers to check for this group.
|
||||
OneTimeTriggers []Scale_Policy_Trigger_OneTime `json:"oneTimeTriggers,omitempty" xmlrpc:"oneTimeTriggers,omitempty"`
|
||||
|
||||
// A count of the repeating triggers to check for this group.
|
||||
RepeatingTriggerCount *uint `json:"repeatingTriggerCount,omitempty" xmlrpc:"repeatingTriggerCount,omitempty"`
|
||||
|
||||
// The repeating triggers to check for this group.
|
||||
RepeatingTriggers []Scale_Policy_Trigger_Repeating `json:"repeatingTriggers,omitempty" xmlrpc:"repeatingTriggers,omitempty"`
|
||||
|
||||
// A count of the resource-use triggers to check for this group.
|
||||
ResourceUseTriggerCount *uint `json:"resourceUseTriggerCount,omitempty" xmlrpc:"resourceUseTriggerCount,omitempty"`
|
||||
|
||||
// The resource-use triggers to check for this group.
|
||||
ResourceUseTriggers []Scale_Policy_Trigger_ResourceUse `json:"resourceUseTriggers,omitempty" xmlrpc:"resourceUseTriggers,omitempty"`
|
||||
|
||||
// A count of the scale actions to perform upon any trigger hit. Currently this must be a single value.
|
||||
ScaleActionCount *uint `json:"scaleActionCount,omitempty" xmlrpc:"scaleActionCount,omitempty"`
|
||||
|
||||
// The scale actions to perform upon any trigger hit. Currently this must be a single value.
|
||||
ScaleActions []Scale_Policy_Action_Scale `json:"scaleActions,omitempty" xmlrpc:"scaleActions,omitempty"`
|
||||
|
||||
// The group this policy is on.
|
||||
ScaleGroup *Scale_Group `json:"scaleGroup,omitempty" xmlrpc:"scaleGroup,omitempty"`
|
||||
|
||||
// The identifier of the group this member belongs to.
|
||||
ScaleGroupId *int `json:"scaleGroupId,omitempty" xmlrpc:"scaleGroupId,omitempty"`
|
||||
|
||||
// A count of the triggers to check for this group.
|
||||
TriggerCount *uint `json:"triggerCount,omitempty" xmlrpc:"triggerCount,omitempty"`
|
||||
|
||||
// The triggers to check for this group.
|
||||
Triggers []Scale_Policy_Trigger `json:"triggers,omitempty" xmlrpc:"triggers,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Action struct {
|
||||
Entity
|
||||
|
||||
// When this action was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// An action's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Then this action was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The policy this action is on.
|
||||
ScalePolicy *Scale_Policy `json:"scalePolicy,omitempty" xmlrpc:"scalePolicy,omitempty"`
|
||||
|
||||
// The policy this action is on.
|
||||
ScalePolicyId *int `json:"scalePolicyId,omitempty" xmlrpc:"scalePolicyId,omitempty"`
|
||||
|
||||
// The type of action.
|
||||
Type *Scale_Policy_Action_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// The identifier of this action's type.
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Action_Scale struct {
|
||||
Scale_Policy_Action
|
||||
|
||||
// The number to scale by. This number has different meanings based on type.
|
||||
Amount *int `json:"amount,omitempty" xmlrpc:"amount,omitempty"`
|
||||
|
||||
// The type of scale to perform. Possible values:
|
||||
//
|
||||
//
|
||||
// * ABSOLUTE - Force the group to be set at a specific number of group members. This may include scaling up or
|
||||
// down or not at all. If the amount is outside of the min/max range of the group, an error occurs.
|
||||
// * PERCENT - Scale the group up or down based on the positive or negative percentage given in amount. The
|
||||
// number is a percent of the current group member count. Any extra percent after the decimal point is always ignored. If the resulting amount is zero, -1 or 1 is used depending upon whether the percentage was negative or positive respectively.
|
||||
// * RELATIVE - Scale the group up or down by the positive or negative value given in amount.
|
||||
ScaleType *string `json:"scaleType,omitempty" xmlrpc:"scaleType,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Action_Type struct {
|
||||
Entity
|
||||
|
||||
// This type's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// An action type's programmatic name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// An action type's human-friendly name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger struct {
|
||||
Entity
|
||||
|
||||
// When this trigger was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// A trigger's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// When this trigger was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The policy this trigger is on.
|
||||
ScalePolicy *Scale_Policy `json:"scalePolicy,omitempty" xmlrpc:"scalePolicy,omitempty"`
|
||||
|
||||
// The policy this trigger is on.
|
||||
ScalePolicyId *int `json:"scalePolicyId,omitempty" xmlrpc:"scalePolicyId,omitempty"`
|
||||
|
||||
// The type of trigger.
|
||||
Type *Scale_Policy_Trigger_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// The type of trigger this is.
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger_OneTime struct {
|
||||
Scale_Policy_Trigger
|
||||
|
||||
// The date to execute the policy.
|
||||
Date *Time `json:"date,omitempty" xmlrpc:"date,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger_Repeating struct {
|
||||
Scale_Policy_Trigger
|
||||
|
||||
// The cron-formatted schedule. This is run in the UTC timezone.
|
||||
Schedule *string `json:"schedule,omitempty" xmlrpc:"schedule,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger_ResourceUse struct {
|
||||
Scale_Policy_Trigger
|
||||
|
||||
// A count of the resource watches for this trigger.
|
||||
WatchCount *uint `json:"watchCount,omitempty" xmlrpc:"watchCount,omitempty"`
|
||||
|
||||
// The resource watches for this trigger.
|
||||
Watches []Scale_Policy_Trigger_ResourceUse_Watch `json:"watches,omitempty" xmlrpc:"watches,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger_ResourceUse_Watch struct {
|
||||
Entity
|
||||
|
||||
// The algorithm to use when aggregating and comparing. Currently, the only value that is accepted is EWMA (Exponential Weighted Moving Average). EWMA is the default value if no value is given.
|
||||
Algorithm *string `json:"algorithm,omitempty" xmlrpc:"algorithm,omitempty"`
|
||||
|
||||
// When this watch was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
|
||||
DeleteFlag *bool `json:"deleteFlag,omitempty" xmlrpc:"deleteFlag,omitempty"`
|
||||
|
||||
// A watch's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The metric to watch. Possible values:
|
||||
//
|
||||
//
|
||||
// * host.cpu.percent - On a scale of 0 to 100, the percent CPU a guest is using.
|
||||
// * host.network.backend.in and host.network.frontend.in - The network bytes-per-second incoming on the interface
|
||||
// of either the frontend or backend network.
|
||||
// * host.network.backend.out and host.network.frontend.out - The network bytes-per-second incoming on the interface
|
||||
// of either the frontend or backend network.
|
||||
Metric *string `json:"metric,omitempty" xmlrpc:"metric,omitempty"`
|
||||
|
||||
// When this watch was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The operator to use for comparison. The only two valid values are ">" and "<".
|
||||
Operator *string `json:"operator,omitempty" xmlrpc:"operator,omitempty"`
|
||||
|
||||
// The number of seconds the values are aggregated for when compared to value. If values are not retrieved steadily and consecutively for the length of this period, nothing is compared.
|
||||
Period *int `json:"period,omitempty" xmlrpc:"period,omitempty"`
|
||||
|
||||
// The trigger this watch is on.
|
||||
ScalePolicyTrigger *Scale_Policy_Trigger_ResourceUse `json:"scalePolicyTrigger,omitempty" xmlrpc:"scalePolicyTrigger,omitempty"`
|
||||
|
||||
// The trigger this watch is on.
|
||||
ScalePolicyTriggerId *int `json:"scalePolicyTriggerId,omitempty" xmlrpc:"scalePolicyTriggerId,omitempty"`
|
||||
|
||||
// The value to compare against. Although the value is a string, validation will be done on the value for restrictions (such as numeric-only) based on the metric.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Policy_Trigger_Type struct {
|
||||
Entity
|
||||
|
||||
// A trigger type's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A trigger type's programmatic name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A trigger type's human-friendly name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Scale_Termination_Policy struct {
|
||||
Entity
|
||||
|
||||
// A termination policy's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A termination policy's programmatic name.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// A termination policy's human-friendly name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
26
vendor/github.com/softlayer/softlayer-go/datatypes/search.go
generated
vendored
Normal file
26
vendor/github.com/softlayer/softlayer-go/datatypes/search.go
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Search struct {
|
||||
Entity
|
||||
}
|
283
vendor/github.com/softlayer/softlayer-go/datatypes/security.go
generated
vendored
Normal file
283
vendor/github.com/softlayer/softlayer-go/datatypes/security.go
generated
vendored
Normal file
|
@ -0,0 +1,283 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// no documentation yet
|
||||
type Security_Certificate struct {
|
||||
Entity
|
||||
|
||||
// The number of services currently associated with the certificate.
|
||||
AssociatedServiceCount *int `json:"associatedServiceCount,omitempty" xmlrpc:"associatedServiceCount,omitempty"`
|
||||
|
||||
// The certificate provided publicly to clients requesting identity credentials. This certificate is usually signed by a source trusted by the client or a signature chain can be established between this certificate and the truested certificate.
|
||||
//
|
||||
// This property may only be modified when no services are associated. See associatedServiceCount.
|
||||
Certificate *string `json:"certificate,omitempty" xmlrpc:"certificate,omitempty"`
|
||||
|
||||
// The signing request used to request a certificate authority generate a signed certificate.
|
||||
//
|
||||
// This property may only be modified when no services are associated. See associatedServiceCount.
|
||||
CertificateSigningRequest *string `json:"certificateSigningRequest,omitempty" xmlrpc:"certificateSigningRequest,omitempty"`
|
||||
|
||||
// The common name (usually a domain name) encoded within the certificate.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
CommonName *string `json:"commonName,omitempty" xmlrpc:"commonName,omitempty"`
|
||||
|
||||
// The date the certificate _record_ was created. The contents of the certificate may of changed since the record was created, so this does not represent anything about the certificate itself.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The ID of the certificate record.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The intermediate certificate authorities certificate that completes the certificate chain for the issued certificate. Required when clients will only trust the root certificate.
|
||||
//
|
||||
// This property may only be modified when no services are associated. See associatedServiceCount.
|
||||
IntermediateCertificate *string `json:"intermediateCertificate,omitempty" xmlrpc:"intermediateCertificate,omitempty"`
|
||||
|
||||
// The size (number of bits) of the public key represented by the certificate.
|
||||
KeySize *int `json:"keySize,omitempty" xmlrpc:"keySize,omitempty"`
|
||||
|
||||
// A count of the load balancers virtual IP addresses currently associated with the certificate.
|
||||
LoadBalancerVirtualIpAddressCount *uint `json:"loadBalancerVirtualIpAddressCount,omitempty" xmlrpc:"loadBalancerVirtualIpAddressCount,omitempty"`
|
||||
|
||||
// The load balancers virtual IP addresses currently associated with the certificate.
|
||||
LoadBalancerVirtualIpAddresses []Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress `json:"loadBalancerVirtualIpAddresses,omitempty" xmlrpc:"loadBalancerVirtualIpAddresses,omitempty"`
|
||||
|
||||
// The date the certificate _record_ was last modified.The contents of the certificate may of changed since the record was created, so this does not represent anything about the certificate itself.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// A note to help describe the certificate.
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
|
||||
// The organizational name encoded in the certificate.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
OrganizationName *string `json:"organizationName,omitempty" xmlrpc:"organizationName,omitempty"`
|
||||
|
||||
// The private key in the key/certificate pair.
|
||||
//
|
||||
// This property may only be modified when no services are associated. See associatedServiceCount.
|
||||
PrivateKey *string `json:"privateKey,omitempty" xmlrpc:"privateKey,omitempty"`
|
||||
|
||||
// The UTC timestamp representing the beginning of the certificate's validity
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
ValidityBegin *Time `json:"validityBegin,omitempty" xmlrpc:"validityBegin,omitempty"`
|
||||
|
||||
// The number of days remaining in the validity period for the certificate.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
ValidityDays *int `json:"validityDays,omitempty" xmlrpc:"validityDays,omitempty"`
|
||||
|
||||
// The UTC timestamp representing the end of the certificate's validity period.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
ValidityEnd *Time `json:"validityEnd,omitempty" xmlrpc:"validityEnd,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Security_Certificate_Entry struct {
|
||||
Entity
|
||||
|
||||
// The ID of the certificate record.
|
||||
CertificateId *int `json:"certificateId,omitempty" xmlrpc:"certificateId,omitempty"`
|
||||
|
||||
// The common name (usually a domain name) encoded within the certificate.
|
||||
CommonName *string `json:"commonName,omitempty" xmlrpc:"commonName,omitempty"`
|
||||
|
||||
// The size (number of bits) of the public key represented by the certificate.
|
||||
KeySize *int `json:"keySize,omitempty" xmlrpc:"keySize,omitempty"`
|
||||
|
||||
// The organizational name encoded in the certificate.
|
||||
OrganizationName *string `json:"organizationName,omitempty" xmlrpc:"organizationName,omitempty"`
|
||||
|
||||
// The UTC timestamp representing the beginning of the certificate's validity
|
||||
ValidityBegin *Time `json:"validityBegin,omitempty" xmlrpc:"validityBegin,omitempty"`
|
||||
|
||||
// The number of days remaining in the validity period for the certificate.
|
||||
ValidityDays *int `json:"validityDays,omitempty" xmlrpc:"validityDays,omitempty"`
|
||||
|
||||
// The UTC timestamp representing the end of the certificate's validity period.
|
||||
ValidityEnd *Time `json:"validityEnd,omitempty" xmlrpc:"validityEnd,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Security_Certificate_Request data type is used to harness your SSL certificate order to a Certificate Authority. This contains data that is required by a Certificate Authority to place an SSL certificate order.
|
||||
type Security_Certificate_Request struct {
|
||||
Entity
|
||||
|
||||
// The account to which a SSL certificate request belongs.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// This is a reference to your SoftLayer account.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// The email address of a person who will approve your SSL certificate order. This is usually an email address of your domain administrator.
|
||||
ApproverEmailAddress *string `json:"approverEmailAddress,omitempty" xmlrpc:"approverEmailAddress,omitempty"`
|
||||
|
||||
// The Certificate Authority name
|
||||
CertificateAuthorityName *string `json:"certificateAuthorityName,omitempty" xmlrpc:"certificateAuthorityName,omitempty"`
|
||||
|
||||
// A Certificate Signing Request (CSR) string
|
||||
CertificateSigningRequest *string `json:"certificateSigningRequest,omitempty" xmlrpc:"certificateSigningRequest,omitempty"`
|
||||
|
||||
// A domain name of a SSL certificate request
|
||||
CommonName *string `json:"commonName,omitempty" xmlrpc:"commonName,omitempty"`
|
||||
|
||||
// The date a SSL certificate request was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The date of your SSL certificate went into effect
|
||||
EffectiveDate *Time `json:"effectiveDate,omitempty" xmlrpc:"effectiveDate,omitempty"`
|
||||
|
||||
// The expiration date of your SSL certificate
|
||||
ExpirationDate *Time `json:"expirationDate,omitempty" xmlrpc:"expirationDate,omitempty"`
|
||||
|
||||
// The internal identifier of an SSL certificate request
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The date a SSL certificate request was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// The order contains the information related to a SSL certificate request.
|
||||
Order *Billing_Order `json:"order,omitempty" xmlrpc:"order,omitempty"`
|
||||
|
||||
// The associated order item for this SSL certificate request.
|
||||
OrderItem *Billing_Order_Item `json:"orderItem,omitempty" xmlrpc:"orderItem,omitempty"`
|
||||
|
||||
// The status of a SSL certificate request.
|
||||
Status *Security_Certificate_Request_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// A status id reflecting the state of a SSL certificate request
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// The technical contact email address.
|
||||
TechnicalContactEmailAddress *string `json:"technicalContactEmailAddress,omitempty" xmlrpc:"technicalContactEmailAddress,omitempty"`
|
||||
}
|
||||
|
||||
// Represents a server type that can be specified when ordering an SSL certificate.
|
||||
type Security_Certificate_Request_ServerType struct {
|
||||
Entity
|
||||
|
||||
// The description of the certificate server type.
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// The internal identifier of the certificate server type.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The name of the certificate server type.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The value of the certificate server type.
|
||||
Value *int `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// Represents the status of an SSL certificate request.
|
||||
type Security_Certificate_Request_Status struct {
|
||||
Entity
|
||||
|
||||
// The description of a SSL certificate request status
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// The internal identifier of an SSL certificate request status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The status name
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Security_Directory_Service_Host_Xref_Hardware extends the [[SoftLayer_Security_Directory_Service_Host_Xref]] data type to include hardware specific properties.
|
||||
type Security_Directory_Service_Host_Xref_Hardware struct {
|
||||
Entity
|
||||
|
||||
// The hardware object.
|
||||
Host *Hardware `json:"host,omitempty" xmlrpc:"host,omitempty"`
|
||||
}
|
||||
|
||||
// Encryption algorithm intended for use in SSL/TLS communications
|
||||
type Security_SecureTransportCipher struct {
|
||||
Entity
|
||||
|
||||
// Unique identifier for the encryption algorithm
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// Protocol intended for use in secure communications
|
||||
type Security_SecureTransportProtocol struct {
|
||||
Entity
|
||||
|
||||
// Unique identifier for the protocol
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// List of the supported encryption ciphers
|
||||
SupportedSecureTransportCiphers []Security_SecureTransportCipher `json:"supportedSecureTransportCiphers,omitempty" xmlrpc:"supportedSecureTransportCiphers,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Security_Ssh_Key struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// A count of the image template groups that are linked to an SSH key.
|
||||
BlockDeviceTemplateGroupCount *uint `json:"blockDeviceTemplateGroupCount,omitempty" xmlrpc:"blockDeviceTemplateGroupCount,omitempty"`
|
||||
|
||||
// The image template groups that are linked to an SSH key.
|
||||
BlockDeviceTemplateGroups []Virtual_Guest_Block_Device_Template_Group `json:"blockDeviceTemplateGroups,omitempty" xmlrpc:"blockDeviceTemplateGroups,omitempty"`
|
||||
|
||||
// The date a ssh key was added.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A short sequence of bytes used to authenticate or lookup a longer ssh key. This will automatically be generated upon adding or modifying the ssh key.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
Fingerprint *string `json:"fingerprint,omitempty" xmlrpc:"fingerprint,omitempty"`
|
||||
|
||||
// The ID of the ssh key record.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The ssh key.
|
||||
Key *string `json:"key,omitempty" xmlrpc:"key,omitempty"`
|
||||
|
||||
// A descriptive name used to identify a ssh key.
|
||||
Label *string `json:"label,omitempty" xmlrpc:"label,omitempty"`
|
||||
|
||||
// The date a ssh key was last modified.
|
||||
//
|
||||
// This property is read only. Changes made will be silently ignored.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// A small note about a ssh key to use at your discretion.
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
|
||||
// A count of the OS root users that are linked to an SSH key.
|
||||
SoftwarePasswordCount *uint `json:"softwarePasswordCount,omitempty" xmlrpc:"softwarePasswordCount,omitempty"`
|
||||
|
||||
// The OS root users that are linked to an SSH key.
|
||||
SoftwarePasswords []Software_Component_Password `json:"softwarePasswords,omitempty" xmlrpc:"softwarePasswords,omitempty"`
|
||||
}
|
55
vendor/github.com/softlayer/softlayer-go/datatypes/service.go
generated
vendored
Normal file
55
vendor/github.com/softlayer/softlayer-go/datatypes/service.go
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Service_External_Resource is a placeholder that references a service being provided outside of the standard SoftLayer system.
|
||||
type Service_External_Resource struct {
|
||||
Entity
|
||||
|
||||
// The customer account that is consuming the service.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The customer account that is consuming the related service.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// The unique identifier in the service provider's system.
|
||||
ExternalIdentifier *string `json:"externalIdentifier,omitempty" xmlrpc:"externalIdentifier,omitempty"`
|
||||
|
||||
// An external resource's unique identifier in the SoftLayer system.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Service_Provider struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
104
vendor/github.com/softlayer/softlayer-go/datatypes/softlayer.go
generated
vendored
Normal file
104
vendor/github.com/softlayer/softlayer-go/datatypes/softlayer.go
generated
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Void is a dummy type for identifying void return values from methods
|
||||
type Void int
|
||||
|
||||
// Time type overrides the default json marshaler with the SoftLayer custom format
|
||||
type Time struct {
|
||||
time.Time
|
||||
}
|
||||
|
||||
func (r Time) String() string {
|
||||
return r.Time.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
// MarshalJSON returns the json encoding of the datatypes.Time receiver. This
|
||||
// override is necessary to ensure datetimes are formatted in the way SoftLayer
|
||||
// expects - that is, using the RFC3339 format, without nanoseconds.
|
||||
func (r Time) MarshalJSON() ([]byte, error) {
|
||||
return []byte(`"` + r.String() + `"`), nil
|
||||
}
|
||||
|
||||
// MarshalText returns a text encoding of the datatypes.Time receiver. This
|
||||
// is mainly provided to complete what might be expected of a type that
|
||||
// implements the Marshaler interface.
|
||||
func (r Time) MarshalText() ([]byte, error) {
|
||||
return []byte(r.String()), nil
|
||||
}
|
||||
|
||||
// FIXME: Need to have special unmarshaling of some values defined as float type
|
||||
// in the metadata that actually come down as strings in the api.
|
||||
// e.g. SoftLayer_Product_Item.capacity
|
||||
// Float64 is a float type that deals with some of the oddities when
|
||||
// unmarshalling from the SLAPI
|
||||
//
|
||||
// Code borrowed from https://github.com/sudorandom/softlayer-go/blob/master/slapi/types/float.go
|
||||
type Float64 float64
|
||||
|
||||
// UnmarshalJSON statisied the json.Unmarshaler interface
|
||||
func (f *Float64) UnmarshalJSON(data []byte) error {
|
||||
|
||||
// Attempt parsing the float normally
|
||||
v, err := strconv.ParseFloat(string(data), 64)
|
||||
|
||||
// Attempt parsing the float as a string
|
||||
if err != nil {
|
||||
if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
|
||||
return fmt.Errorf("malformed data")
|
||||
}
|
||||
|
||||
v, err = strconv.ParseFloat(string(data[1:len(data)-1]), 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
*f = Float64(v)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Used to set the appropriate complexType field in the passed product order.
|
||||
// Employs reflection to determine the type of the passed value and use it
|
||||
// to derive the complexType to send to SoftLayer.
|
||||
func SetComplexType(v interface{}) error {
|
||||
orderDataPtr := reflect.ValueOf(v)
|
||||
if orderDataPtr.Type().Name() != "" {
|
||||
return errors.New("Did not pass a pointer to a product order.")
|
||||
}
|
||||
|
||||
orderDataValue := reflect.Indirect(reflect.ValueOf(v))
|
||||
orderDataType := orderDataValue.Type().Name()
|
||||
if !strings.HasPrefix(orderDataType, "Container_Product_Order") {
|
||||
return fmt.Errorf("Did not pass a pointer to a product order: %s", orderDataType)
|
||||
}
|
||||
|
||||
complexTypeField := orderDataValue.FieldByName("ComplexType")
|
||||
complexType := "SoftLayer_" + orderDataType
|
||||
complexTypeField.Set(reflect.ValueOf(&complexType))
|
||||
|
||||
return nil
|
||||
}
|
768
vendor/github.com/softlayer/softlayer-go/datatypes/software.go
generated
vendored
Normal file
768
vendor/github.com/softlayer/softlayer-go/datatypes/software.go
generated
vendored
Normal file
|
@ -0,0 +1,768 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// SoftLayer_Software_AccountLicense is a class that represents software licenses that are tied only to a customer's account and not to any particular hardware, IP address, etc.
|
||||
type Software_AccountLicense struct {
|
||||
Entity
|
||||
|
||||
// The customer account this Account License belongs to.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The ID of the SoftLayer Account to which this Account License belongs to.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// The billing item for a software account license.
|
||||
BillingItem *Billing_Item `json:"billingItem,omitempty" xmlrpc:"billingItem,omitempty"`
|
||||
|
||||
// Some Account Licenses have capacity information such as CPU specified in the units key. This provides the numerical representation of the capacity of the units.
|
||||
Capacity *string `json:"capacity,omitempty" xmlrpc:"capacity,omitempty"`
|
||||
|
||||
// The License Key for this specific Account License.
|
||||
Key *string `json:"key,omitempty" xmlrpc:"key,omitempty"`
|
||||
|
||||
// The SoftLayer_Software_Description that this account license is for.
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// The unit of measurement that an account license has the capacity of.
|
||||
Units *string `json:"units,omitempty" xmlrpc:"units,omitempty"`
|
||||
}
|
||||
|
||||
// A SoftLayer_Software_Component ties the installation of a specific piece of software onto a specific piece of hardware.
|
||||
//
|
||||
// SoftLayer_Software_Component works with SoftLayer_Software_License and SoftLayer_Software_Description to tie this all together.
|
||||
//
|
||||
// <ul> <li>SoftLayer_Software_Component is the installation of a specific piece of software onto a specific piece of hardware in accordance to a software license. <ul> <li>SoftLayer_Software_License dictates when and how a specific piece of software may be installed onto a piece of hardware. <ul> <li>SoftLayer_Software_Description describes a specific piece of software which can be installed onto hardware in accordance with it's license agreement. </li></ul></li></ul></li></ul>
|
||||
type Software_Component struct {
|
||||
Entity
|
||||
|
||||
// The average amount of time that a software component takes to install.
|
||||
AverageInstallationDuration *uint `json:"averageInstallationDuration,omitempty" xmlrpc:"averageInstallationDuration,omitempty"`
|
||||
|
||||
// The billing item for a software component.
|
||||
BillingItem *Billing_Item `json:"billingItem,omitempty" xmlrpc:"billingItem,omitempty"`
|
||||
|
||||
// The hardware this Software Component is installed upon.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// Hardware Identification Number for the server this Software Component is installed upon.
|
||||
HardwareId *int `json:"hardwareId,omitempty" xmlrpc:"hardwareId,omitempty"`
|
||||
|
||||
// An ID number identifying this Software Component (Software Installation)
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The manufacturer code that is needed to activate a license.
|
||||
ManufacturerActivationCode *string `json:"manufacturerActivationCode,omitempty" xmlrpc:"manufacturerActivationCode,omitempty"`
|
||||
|
||||
// A license key for this specific installation of software, if it is needed.
|
||||
ManufacturerLicenseInstance *string `json:"manufacturerLicenseInstance,omitempty" xmlrpc:"manufacturerLicenseInstance,omitempty"`
|
||||
|
||||
// A count of username/Password pairs used for access to this Software Installation.
|
||||
PasswordCount *uint `json:"passwordCount,omitempty" xmlrpc:"passwordCount,omitempty"`
|
||||
|
||||
// History Records for Software Passwords.
|
||||
PasswordHistory []Software_Component_Password_History `json:"passwordHistory,omitempty" xmlrpc:"passwordHistory,omitempty"`
|
||||
|
||||
// A count of history Records for Software Passwords.
|
||||
PasswordHistoryCount *uint `json:"passwordHistoryCount,omitempty" xmlrpc:"passwordHistoryCount,omitempty"`
|
||||
|
||||
// Username/Password pairs used for access to this Software Installation.
|
||||
Passwords []Software_Component_Password `json:"passwords,omitempty" xmlrpc:"passwords,omitempty"`
|
||||
|
||||
// The Software Description of this Software Component.
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// The License this Software Component uses.
|
||||
SoftwareLicense *Software_License `json:"softwareLicense,omitempty" xmlrpc:"softwareLicense,omitempty"`
|
||||
|
||||
// The virtual guest this software component is installed upon.
|
||||
VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"`
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: An analytics instance. Analytics installations have a specific default ports and patterns for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_Analytics struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: An Urchin instance. Urchin installations have a specific default port (9999) and a pattern for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_Analytics_Urchin struct {
|
||||
Software_Component_Analytics
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: An Anti-virus/spyware instance. Anti-virus/spyware installations have specific properties and methods such as SoftLayer_Software_Component_AntivirusSpyware::updateAntivirusSpywarePolicy. Defaults are initiated by this object.
|
||||
type Software_Component_AntivirusSpyware struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_AntivirusSpyware_Mcafee represents a single anti-virus/spyware software component.
|
||||
type Software_Component_AntivirusSpyware_Mcafee struct {
|
||||
Software_Component_AntivirusSpyware
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_AntivirusSpyware_Mcafee_Epo_Version36 data type represents a single McAfee Secure anti-virus/spyware software component that uses the ePolicy Orchestrator version 3.6 backend.
|
||||
type Software_Component_AntivirusSpyware_Mcafee_Epo_Version36 struct {
|
||||
Software_Component_AntivirusSpyware_Mcafee
|
||||
|
||||
// The virus scan agent details.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version36_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// The current anti-virus policy.
|
||||
CurrentAntivirusPolicy *int `json:"currentAntivirusPolicy,omitempty" xmlrpc:"currentAntivirusPolicy,omitempty"`
|
||||
|
||||
// The virus definition file version.
|
||||
DataFileVersion *McAfee_Epolicy_Orchestrator_Version36_Product_Properties `json:"dataFileVersion,omitempty" xmlrpc:"dataFileVersion,omitempty"`
|
||||
|
||||
// The version of ePolicy Orchestrator that the anti-virus/spyware client communicates with.
|
||||
EpoVersion *string `json:"epoVersion,omitempty" xmlrpc:"epoVersion,omitempty"`
|
||||
|
||||
// A count of the latest access protection events.
|
||||
LatestAccessProtectionEventCount *uint `json:"latestAccessProtectionEventCount,omitempty" xmlrpc:"latestAccessProtectionEventCount,omitempty"`
|
||||
|
||||
// The latest access protection events.
|
||||
LatestAccessProtectionEvents []McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event_AccessProtection `json:"latestAccessProtectionEvents,omitempty" xmlrpc:"latestAccessProtectionEvents,omitempty"`
|
||||
|
||||
// A count of the latest anti-virus events.
|
||||
LatestAntivirusEventCount *uint `json:"latestAntivirusEventCount,omitempty" xmlrpc:"latestAntivirusEventCount,omitempty"`
|
||||
|
||||
// The latest anti-virus events.
|
||||
LatestAntivirusEvents []McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event `json:"latestAntivirusEvents,omitempty" xmlrpc:"latestAntivirusEvents,omitempty"`
|
||||
|
||||
// A count of the latest spyware events.
|
||||
LatestSpywareEventCount *uint `json:"latestSpywareEventCount,omitempty" xmlrpc:"latestSpywareEventCount,omitempty"`
|
||||
|
||||
// The latest spyware events.
|
||||
LatestSpywareEvents []McAfee_Epolicy_Orchestrator_Version36_Antivirus_Event `json:"latestSpywareEvents,omitempty" xmlrpc:"latestSpywareEvents,omitempty"`
|
||||
|
||||
// The current transaction status of a server.
|
||||
TransactionStatus *string `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_AntivirusSpyware_Mcafee_Epo_Version45 data type represents a single McAfee Secure anti-virus/spyware software component that uses the ePolicy Orchestrator version 4.5 backend.
|
||||
type Software_Component_AntivirusSpyware_Mcafee_Epo_Version45 struct {
|
||||
Software_Component_AntivirusSpyware_Mcafee
|
||||
|
||||
// The virus scan agent details.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version45_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// The current anti-virus policy.
|
||||
CurrentAntivirusPolicy *int `json:"currentAntivirusPolicy,omitempty" xmlrpc:"currentAntivirusPolicy,omitempty"`
|
||||
|
||||
// The virus definition file version.
|
||||
DataFileVersion *McAfee_Epolicy_Orchestrator_Version45_Product_Properties `json:"dataFileVersion,omitempty" xmlrpc:"dataFileVersion,omitempty"`
|
||||
|
||||
// The version of ePolicy Orchestrator that the anti-virus/spyware client communicates with.
|
||||
EpoVersion *string `json:"epoVersion,omitempty" xmlrpc:"epoVersion,omitempty"`
|
||||
|
||||
// A count of the latest access protection events.
|
||||
LatestAccessProtectionEventCount *uint `json:"latestAccessProtectionEventCount,omitempty" xmlrpc:"latestAccessProtectionEventCount,omitempty"`
|
||||
|
||||
// The latest access protection events.
|
||||
LatestAccessProtectionEvents []McAfee_Epolicy_Orchestrator_Version45_Event `json:"latestAccessProtectionEvents,omitempty" xmlrpc:"latestAccessProtectionEvents,omitempty"`
|
||||
|
||||
// A count of the latest anti-virus events.
|
||||
LatestAntivirusEventCount *uint `json:"latestAntivirusEventCount,omitempty" xmlrpc:"latestAntivirusEventCount,omitempty"`
|
||||
|
||||
// The latest anti-virus events.
|
||||
LatestAntivirusEvents []McAfee_Epolicy_Orchestrator_Version45_Event `json:"latestAntivirusEvents,omitempty" xmlrpc:"latestAntivirusEvents,omitempty"`
|
||||
|
||||
// A count of the latest spyware events
|
||||
LatestSpywareEventCount *uint `json:"latestSpywareEventCount,omitempty" xmlrpc:"latestSpywareEventCount,omitempty"`
|
||||
|
||||
// The latest spyware events
|
||||
LatestSpywareEvents []McAfee_Epolicy_Orchestrator_Version45_Event `json:"latestSpywareEvents,omitempty" xmlrpc:"latestSpywareEvents,omitempty"`
|
||||
|
||||
// The current transaction status of a server.
|
||||
TransactionStatus *string `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A control panel instance. Control panel installations have a specific default ports and patterns for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_ControlPanel struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: A cPanel instance. cPanel installations have a specific default port (2086) and a pattern for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_ControlPanel_Cpanel struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific type of control panel Software Component: An Idera instance.
|
||||
type Software_Component_ControlPanel_Idera struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A Idera Server Backup instance.
|
||||
type Software_Component_ControlPanel_Idera_ServerBackup struct {
|
||||
Software_Component_ControlPanel_Idera
|
||||
}
|
||||
|
||||
// This object is a parent class for Microsoft Products, like Web Matrix
|
||||
type Software_Component_ControlPanel_Microsoft struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: A WebPlatform instance. WebPlatform installations have a specific xml config with usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_ControlPanel_Microsoft_WebPlatform struct {
|
||||
Software_Component_ControlPanel_Microsoft
|
||||
}
|
||||
|
||||
// This object is a parent class for SWSoft Products, like Plesk
|
||||
type Software_Component_ControlPanel_Parallels struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: A Plesk instance produced by SWSoft. SWSoft Plesk installations have a specific default port (8443) and a pattern for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_ControlPanel_Parallels_Plesk struct {
|
||||
Software_Component_ControlPanel_Parallels
|
||||
}
|
||||
|
||||
// This object specifies a specific type of control panel Software Component: A R1soft instance.
|
||||
type Software_Component_ControlPanel_R1soft struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A R1soft continuous data protection instance.
|
||||
type Software_Component_ControlPanel_R1soft_Cdp struct {
|
||||
Software_Component_ControlPanel_R1soft
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A R1Soft Server Backup instance.
|
||||
type Software_Component_ControlPanel_R1soft_ServerBackup struct {
|
||||
Software_Component_ControlPanel_R1soft
|
||||
}
|
||||
|
||||
// This object is a parent class for SWSoft Products, like Plesk
|
||||
type Software_Component_ControlPanel_Swsoft struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: A Helm instance produced by Webhost Automation. WEbhost Automation's Helm installations have a specific default port (8086) and a pattern for usernames and passwords. Defaults are initiated by this object.
|
||||
type Software_Component_ControlPanel_WebhostAutomation struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A Host Intrusion Protection System instance.
|
||||
type Software_Component_HostIps struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee represents a single host IPS software component.
|
||||
type Software_Component_HostIps_Mcafee struct {
|
||||
Software_Component_HostIps
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version36_Hips data type represents a single McAfee Secure Host IPS software component that uses the ePolicy Orchestrator version 3.6 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version36_Hips struct {
|
||||
Software_Component_HostIps_Mcafee
|
||||
|
||||
// The host IPS agent details.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version36_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the application mode setting.
|
||||
ApplicationModePolicyNameCount *uint `json:"applicationModePolicyNameCount,omitempty" xmlrpc:"applicationModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the application mode setting.
|
||||
ApplicationModePolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"applicationModePolicyNames,omitempty" xmlrpc:"applicationModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the application rule set setting.
|
||||
ApplicationRuleSetPolicyNameCount *uint `json:"applicationRuleSetPolicyNameCount,omitempty" xmlrpc:"applicationRuleSetPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the application rule set setting.
|
||||
ApplicationRuleSetPolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"applicationRuleSetPolicyNames,omitempty" xmlrpc:"applicationRuleSetPolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible options for the enforcement policy setting.
|
||||
EnforcementPolicyNameCount *uint `json:"enforcementPolicyNameCount,omitempty" xmlrpc:"enforcementPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible options for the enforcement policy setting.
|
||||
EnforcementPolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"enforcementPolicyNames,omitempty" xmlrpc:"enforcementPolicyNames,omitempty"`
|
||||
|
||||
// The version of ePolicy Orchestrator that the host IPS client communicates with.
|
||||
EpoVersion *string `json:"epoVersion,omitempty" xmlrpc:"epoVersion,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the firewall mode setting.
|
||||
FirewallModePolicyNameCount *uint `json:"firewallModePolicyNameCount,omitempty" xmlrpc:"firewallModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the firewall mode setting.
|
||||
FirewallModePolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"firewallModePolicyNames,omitempty" xmlrpc:"firewallModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the firewall rule set setting.
|
||||
FirewallRuleSetPolicyNameCount *uint `json:"firewallRuleSetPolicyNameCount,omitempty" xmlrpc:"firewallRuleSetPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the firewall rule set setting.
|
||||
FirewallRuleSetPolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"firewallRuleSetPolicyNames,omitempty" xmlrpc:"firewallRuleSetPolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the host IPS mode setting.
|
||||
IpsModePolicyNameCount *uint `json:"ipsModePolicyNameCount,omitempty" xmlrpc:"ipsModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the host IPS mode setting.
|
||||
IpsModePolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"ipsModePolicyNames,omitempty" xmlrpc:"ipsModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the host IPS protection setting.
|
||||
IpsProtectionPolicyNameCount *uint `json:"ipsProtectionPolicyNameCount,omitempty" xmlrpc:"ipsProtectionPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the host IPS protection setting.
|
||||
IpsProtectionPolicyNames []McAfee_Epolicy_Orchestrator_Version36_Policy_Object `json:"ipsProtectionPolicyNames,omitempty" xmlrpc:"ipsProtectionPolicyNames,omitempty"`
|
||||
|
||||
// The current transaction status of a server.
|
||||
TransactionStatus *string `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version36_Hips_Version6 data type represents a single McAfee Secure Host IPS software component for version 6 of the Host IPS client and uses the ePolicy Orchestrator version 3.6 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version36_Hips_Version6 struct {
|
||||
Software_Component_HostIps_Mcafee_Epo_Version36_Hips
|
||||
|
||||
// A count of the blocked application events for this software component.
|
||||
BlockedApplicationEventCount *uint `json:"blockedApplicationEventCount,omitempty" xmlrpc:"blockedApplicationEventCount,omitempty"`
|
||||
|
||||
// The blocked application events for this software component.
|
||||
BlockedApplicationEvents []McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_BlockedApplicationEvent `json:"blockedApplicationEvents,omitempty" xmlrpc:"blockedApplicationEvents,omitempty"`
|
||||
|
||||
// A count of the host IPS events for this software component.
|
||||
IpsEventCount *uint `json:"ipsEventCount,omitempty" xmlrpc:"ipsEventCount,omitempty"`
|
||||
|
||||
// The host IPS events for this software component.
|
||||
IpsEvents []McAfee_Epolicy_Orchestrator_Version36_Hips_Version6_IPSEvent `json:"ipsEvents,omitempty" xmlrpc:"ipsEvents,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version36_Hips_Version7 data type represents a single McAfee Secure Host IPS software component for version 7 of the Host IPS client and uses the ePolicy Orchestrator version 3.6 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version36_Hips_Version7 struct {
|
||||
Software_Component_HostIps_Mcafee_Epo_Version36_Hips
|
||||
|
||||
// A count of the blocked application events for this software component.
|
||||
BlockedApplicationEventCount *uint `json:"blockedApplicationEventCount,omitempty" xmlrpc:"blockedApplicationEventCount,omitempty"`
|
||||
|
||||
// The blocked application events for this software component.
|
||||
BlockedApplicationEvents []McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_BlockedApplicationEvent `json:"blockedApplicationEvents,omitempty" xmlrpc:"blockedApplicationEvents,omitempty"`
|
||||
|
||||
// A count of the host IPS events for this software component.
|
||||
IpsEventCount *uint `json:"ipsEventCount,omitempty" xmlrpc:"ipsEventCount,omitempty"`
|
||||
|
||||
// The host IPS events for this software component.
|
||||
IpsEvents []McAfee_Epolicy_Orchestrator_Version36_Hips_Version7_IPSEvent `json:"ipsEvents,omitempty" xmlrpc:"ipsEvents,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version45_Hips data type represents a single McAfee Secure Host IPS software component that uses the ePolicy Orchestrator version 4.5 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version45_Hips struct {
|
||||
Software_Component_HostIps_Mcafee
|
||||
|
||||
// The host IPS agent details.
|
||||
AgentDetails *McAfee_Epolicy_Orchestrator_Version45_Agent_Details `json:"agentDetails,omitempty" xmlrpc:"agentDetails,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the application mode setting.
|
||||
ApplicationModePolicyNameCount *uint `json:"applicationModePolicyNameCount,omitempty" xmlrpc:"applicationModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the application mode setting.
|
||||
ApplicationModePolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"applicationModePolicyNames,omitempty" xmlrpc:"applicationModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the application rule set setting.
|
||||
ApplicationRuleSetPolicyNameCount *uint `json:"applicationRuleSetPolicyNameCount,omitempty" xmlrpc:"applicationRuleSetPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the application rule set setting.
|
||||
ApplicationRuleSetPolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"applicationRuleSetPolicyNames,omitempty" xmlrpc:"applicationRuleSetPolicyNames,omitempty"`
|
||||
|
||||
// A count of the blocked application events for this software component.
|
||||
BlockedApplicationEventCount *uint `json:"blockedApplicationEventCount,omitempty" xmlrpc:"blockedApplicationEventCount,omitempty"`
|
||||
|
||||
// The blocked application events for this software component.
|
||||
BlockedApplicationEvents []McAfee_Epolicy_Orchestrator_Version45_Event `json:"blockedApplicationEvents,omitempty" xmlrpc:"blockedApplicationEvents,omitempty"`
|
||||
|
||||
// A count of the names of the possible options for the enforcement policy setting.
|
||||
EnforcementPolicyNameCount *uint `json:"enforcementPolicyNameCount,omitempty" xmlrpc:"enforcementPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible options for the enforcement policy setting.
|
||||
EnforcementPolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"enforcementPolicyNames,omitempty" xmlrpc:"enforcementPolicyNames,omitempty"`
|
||||
|
||||
// The version of ePolicy Orchestrator that the host IPS client communicates with.
|
||||
EpoVersion *string `json:"epoVersion,omitempty" xmlrpc:"epoVersion,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the firewall mode setting.
|
||||
FirewallModePolicyNameCount *uint `json:"firewallModePolicyNameCount,omitempty" xmlrpc:"firewallModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the firewall mode setting.
|
||||
FirewallModePolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"firewallModePolicyNames,omitempty" xmlrpc:"firewallModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the firewall rule set setting.
|
||||
FirewallRuleSetPolicyNameCount *uint `json:"firewallRuleSetPolicyNameCount,omitempty" xmlrpc:"firewallRuleSetPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the firewall rule set setting.
|
||||
FirewallRuleSetPolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"firewallRuleSetPolicyNames,omitempty" xmlrpc:"firewallRuleSetPolicyNames,omitempty"`
|
||||
|
||||
// A count of the host IPS events for this software component.
|
||||
IpsEventCount *uint `json:"ipsEventCount,omitempty" xmlrpc:"ipsEventCount,omitempty"`
|
||||
|
||||
// The host IPS events for this software component.
|
||||
IpsEvents []McAfee_Epolicy_Orchestrator_Version45_Event `json:"ipsEvents,omitempty" xmlrpc:"ipsEvents,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the host IPS mode setting.
|
||||
IpsModePolicyNameCount *uint `json:"ipsModePolicyNameCount,omitempty" xmlrpc:"ipsModePolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the host IPS mode setting.
|
||||
IpsModePolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"ipsModePolicyNames,omitempty" xmlrpc:"ipsModePolicyNames,omitempty"`
|
||||
|
||||
// A count of the names of the possible policy options for the host IPS protection setting.
|
||||
IpsProtectionPolicyNameCount *uint `json:"ipsProtectionPolicyNameCount,omitempty" xmlrpc:"ipsProtectionPolicyNameCount,omitempty"`
|
||||
|
||||
// The names of the possible policy options for the host IPS protection setting.
|
||||
IpsProtectionPolicyNames []McAfee_Epolicy_Orchestrator_Version45_Policy_Object `json:"ipsProtectionPolicyNames,omitempty" xmlrpc:"ipsProtectionPolicyNames,omitempty"`
|
||||
|
||||
// The current transaction status of a server.
|
||||
TransactionStatus *string `json:"transactionStatus,omitempty" xmlrpc:"transactionStatus,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version45_Hips_Version7 data type represents a single McAfee Secure Host IPS software component for version 7 of the Host IPS client and uses the ePolicy Orchestrator version 4.5 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version45_Hips_Version7 struct {
|
||||
Software_Component_HostIps_Mcafee_Epo_Version45_Hips
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Component_HostIps_Mcafee_Epo_Version45_Hips_Version8 data type represents a single McAfee Secure Host IPS software component for version 8 of the Host IPS client and uses the ePolicy Orchestrator version 4.5 backend.
|
||||
type Software_Component_HostIps_Mcafee_Epo_Version45_Hips_Version8 struct {
|
||||
Software_Component_HostIps_Mcafee_Epo_Version45_Hips
|
||||
}
|
||||
|
||||
// SoftLayer_Software_Component_OperatingSystem extends the [[SoftLayer_Software_Component]] data type to include operating system specific properties.
|
||||
type Software_Component_OperatingSystem struct {
|
||||
Software_Component
|
||||
|
||||
// The date in which the license for this software expires.
|
||||
LicenseExpirationDate *Time `json:"licenseExpirationDate,omitempty" xmlrpc:"licenseExpirationDate,omitempty"`
|
||||
|
||||
// A count of an operating system's associated [[SoftLayer_Hardware_Component_Partition_Template|Partition Templates]] that can be used to configure a hardware drive.
|
||||
PartitionTemplateCount *uint `json:"partitionTemplateCount,omitempty" xmlrpc:"partitionTemplateCount,omitempty"`
|
||||
|
||||
// An operating system's associated [[SoftLayer_Hardware_Component_Partition_Template|Partition Templates]] that can be used to configure a hardware drive.
|
||||
PartitionTemplates []Hardware_Component_Partition_Template `json:"partitionTemplates,omitempty" xmlrpc:"partitionTemplates,omitempty"`
|
||||
|
||||
// An operating systems associated [[SoftLayer_Provisioning_Version1_Transaction_Group|Transaction Group]]. A transaction group is a list of operations that will occur during the installment of an operating system.
|
||||
ReloadTransactionGroup *Provisioning_Version1_Transaction_Group `json:"reloadTransactionGroup,omitempty" xmlrpc:"reloadTransactionGroup,omitempty"`
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A package instance.
|
||||
type Software_Component_Package struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A package management instance.
|
||||
type Software_Component_Package_Management struct {
|
||||
Software_Component_Package
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A Ksplice instance.
|
||||
type Software_Component_Package_Management_Ksplice struct {
|
||||
Software_Component_Package_Management
|
||||
}
|
||||
|
||||
// This SoftLayer_Software_Component_Password data type contains a password for a specific software component instance.
|
||||
type Software_Component_Password struct {
|
||||
Entity
|
||||
|
||||
// The date this username/password pair was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// An id number for this specific username/password pair.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The date of the last modification to this username/password pair.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// A note string stored for this username/password pair.
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
|
||||
// The password part of the username/password pair.
|
||||
Password *string `json:"password,omitempty" xmlrpc:"password,omitempty"`
|
||||
|
||||
// The application access port for the Software Component.
|
||||
Port *int `json:"port,omitempty" xmlrpc:"port,omitempty"`
|
||||
|
||||
// The SoftLayer_Software_Component instance that this username/password pair is valid for.
|
||||
Software *Software_Component `json:"software,omitempty" xmlrpc:"software,omitempty"`
|
||||
|
||||
// An id number for the software component this username/password pair is valid for.
|
||||
SoftwareId *int `json:"softwareId,omitempty" xmlrpc:"softwareId,omitempty"`
|
||||
|
||||
// A count of sSH keys to be installed on the server during provisioning or an OS reload.
|
||||
SshKeyCount *uint `json:"sshKeyCount,omitempty" xmlrpc:"sshKeyCount,omitempty"`
|
||||
|
||||
// SSH keys to be installed on the server during provisioning or an OS reload.
|
||||
SshKeys []Security_Ssh_Key `json:"sshKeys,omitempty" xmlrpc:"sshKeys,omitempty"`
|
||||
|
||||
// The username part of the username/password pair.
|
||||
Username *string `json:"username,omitempty" xmlrpc:"username,omitempty"`
|
||||
}
|
||||
|
||||
// This object allows you to find the history of password changes for a specific SoftLayer_Software Component
|
||||
type Software_Component_Password_History struct {
|
||||
Entity
|
||||
|
||||
// The date this username/password pair was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A note string stored for this username/password pair.
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
|
||||
// The password part of this specific password history instance.
|
||||
Password *string `json:"password,omitempty" xmlrpc:"password,omitempty"`
|
||||
|
||||
// An installed and licensed instance of a piece of software
|
||||
SoftwareComponent *Software_Component `json:"softwareComponent,omitempty" xmlrpc:"softwareComponent,omitempty"`
|
||||
|
||||
// The id number for the Software Component this username/password pair is for.
|
||||
SoftwareComponentId *int `json:"softwareComponentId,omitempty" xmlrpc:"softwareComponentId,omitempty"`
|
||||
|
||||
// The username part of this specific password history instance.
|
||||
Username *string `json:"username,omitempty" xmlrpc:"username,omitempty"`
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A security instance. Security installations have custom configurations for password requirements.
|
||||
type Software_Component_Security struct {
|
||||
Software_Component
|
||||
}
|
||||
|
||||
// This object specifies a specific Software Component: A SafeNet instance. SafeNet installations have custom configurations for password requirements.
|
||||
type Software_Component_Security_SafeNet struct {
|
||||
Software_Component_Security
|
||||
}
|
||||
|
||||
// This class holds a description for a specific installation of a Software Component.
|
||||
//
|
||||
// SoftLayer_Software_Licenses tie a Software Component (A specific installation on a piece of hardware) to it's description.
|
||||
//
|
||||
// The "Manufacturer" and "Name" properties of a SoftLayer_Software_Description are used by the framework to factory specific objects, objects that may have special methods for that specific piece of software, or objects that contain application specific data, such as default ports. For example, if you create a SoftLayer_Software_Component who's SoftLayer_Software_License points to the SoftLayer_Software_Description for "Swsoft" "Plesk", you'll actually get a SoftLayer_Software_Component_Swsoft_Plesk object.
|
||||
type Software_Description struct {
|
||||
Entity
|
||||
|
||||
// A count of
|
||||
AttributeCount *uint `json:"attributeCount,omitempty" xmlrpc:"attributeCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Attributes []Software_Description_Attribute `json:"attributes,omitempty" xmlrpc:"attributes,omitempty"`
|
||||
|
||||
// The average amount of time that a software description takes to install.
|
||||
AverageInstallationDuration *int `json:"averageInstallationDuration,omitempty" xmlrpc:"averageInstallationDuration,omitempty"`
|
||||
|
||||
// A count of a list of the software descriptions that are compatible with this software description.
|
||||
CompatibleSoftwareDescriptionCount *uint `json:"compatibleSoftwareDescriptionCount,omitempty" xmlrpc:"compatibleSoftwareDescriptionCount,omitempty"`
|
||||
|
||||
// A list of the software descriptions that are compatible with this software description.
|
||||
CompatibleSoftwareDescriptions []Software_Description `json:"compatibleSoftwareDescriptions,omitempty" xmlrpc:"compatibleSoftwareDescriptions,omitempty"`
|
||||
|
||||
// This is set to '1' if this Software Description describes a Control Panel.
|
||||
ControlPanel *int `json:"controlPanel,omitempty" xmlrpc:"controlPanel,omitempty"`
|
||||
|
||||
// A count of the feature attributes of a software description.
|
||||
FeatureCount *uint `json:"featureCount,omitempty" xmlrpc:"featureCount,omitempty"`
|
||||
|
||||
// The feature attributes of a software description.
|
||||
Features []Software_Description_Feature `json:"features,omitempty" xmlrpc:"features,omitempty"`
|
||||
|
||||
// An ID number to identify this Software Description.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The latest version of a software description.
|
||||
LatestVersion []Software_Description `json:"latestVersion,omitempty" xmlrpc:"latestVersion,omitempty"`
|
||||
|
||||
// A count of the latest version of a software description.
|
||||
LatestVersionCount *uint `json:"latestVersionCount,omitempty" xmlrpc:"latestVersionCount,omitempty"`
|
||||
|
||||
// The unit of measurement (day, month, or year) for license registration. Used in conjunction with licenseTermValue to determine overall license registration length of a new license.
|
||||
LicenseTermUnit *string `json:"licenseTermUnit,omitempty" xmlrpc:"licenseTermUnit,omitempty"`
|
||||
|
||||
// The number of units (licenseTermUnit) a new license is valid for at the time of registration.
|
||||
LicenseTermValue *int `json:"licenseTermValue,omitempty" xmlrpc:"licenseTermValue,omitempty"`
|
||||
|
||||
// The manufacturer, name and version of a piece of software.
|
||||
LongDescription *string `json:"longDescription,omitempty" xmlrpc:"longDescription,omitempty"`
|
||||
|
||||
// The name of the manufacturer for this specific piece of software. This name is used by SoftLayer_Software_Component to tailor make (factory) specific types of Software Components that know details like default ports.
|
||||
Manufacturer *string `json:"manufacturer,omitempty" xmlrpc:"manufacturer,omitempty"`
|
||||
|
||||
// The name of this specific piece of software. This name is used by SoftLayer_Software_Component to tailor make (factory) specific types of Software Components that know details like default ports.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// This is set to '1' if this Software Description describes an Operating System.
|
||||
OperatingSystem *int `json:"operatingSystem,omitempty" xmlrpc:"operatingSystem,omitempty"`
|
||||
|
||||
// A count of the various product items to which this software description is linked.
|
||||
ProductItemCount *uint `json:"productItemCount,omitempty" xmlrpc:"productItemCount,omitempty"`
|
||||
|
||||
// The various product items to which this software description is linked.
|
||||
ProductItems []Product_Item `json:"productItems,omitempty" xmlrpc:"productItems,omitempty"`
|
||||
|
||||
// This details the provisioning transaction group for this software. This is only valid for Operating System software.
|
||||
ProvisionTransactionGroup *Provisioning_Version1_Transaction_Group `json:"provisionTransactionGroup,omitempty" xmlrpc:"provisionTransactionGroup,omitempty"`
|
||||
|
||||
// A reference code is structured as three tokens separated by underscores. The first token represents the product, the second is the version of the product, and the third is whether the software is 32 or 64bit.
|
||||
ReferenceCode *string `json:"referenceCode,omitempty" xmlrpc:"referenceCode,omitempty"`
|
||||
|
||||
// The transaction group that a software description belongs to. A transaction group is a sequence of transactions that must be performed in a specific order for the installation of software.
|
||||
ReloadTransactionGroup *Provisioning_Version1_Transaction_Group `json:"reloadTransactionGroup,omitempty" xmlrpc:"reloadTransactionGroup,omitempty"`
|
||||
|
||||
// The default user created for a given a software description.
|
||||
RequiredUser *string `json:"requiredUser,omitempty" xmlrpc:"requiredUser,omitempty"`
|
||||
|
||||
// A count of software Licenses that govern this Software Description.
|
||||
SoftwareLicenseCount *uint `json:"softwareLicenseCount,omitempty" xmlrpc:"softwareLicenseCount,omitempty"`
|
||||
|
||||
// Software Licenses that govern this Software Description.
|
||||
SoftwareLicenses []Software_License `json:"softwareLicenses,omitempty" xmlrpc:"softwareLicenses,omitempty"`
|
||||
|
||||
// A suggestion for an upgrade path from this Software Description
|
||||
UpgradeSoftwareDescription *Software_Description `json:"upgradeSoftwareDescription,omitempty" xmlrpc:"upgradeSoftwareDescription,omitempty"`
|
||||
|
||||
// Contains the ID of the suggested upgrade from this Software_Description to a more powerful software installation.
|
||||
UpgradeSoftwareDescriptionId *int `json:"upgradeSoftwareDescriptionId,omitempty" xmlrpc:"upgradeSoftwareDescriptionId,omitempty"`
|
||||
|
||||
// A suggestion for an upgrade path from this Software Description (Deprecated - Use upgradeSoftwareDescription)
|
||||
UpgradeSwDesc *Software_Description `json:"upgradeSwDesc,omitempty" xmlrpc:"upgradeSwDesc,omitempty"`
|
||||
|
||||
// Contains the ID of the suggested upgrade from this Software_Description to a more powerful software installation. (Deprecated - Use upgradeSoftwareDescriptionId)
|
||||
UpgradeSwDescId *int `json:"upgradeSwDescId,omitempty" xmlrpc:"upgradeSwDescId,omitempty"`
|
||||
|
||||
// A count of
|
||||
ValidFilesystemTypeCount *uint `json:"validFilesystemTypeCount,omitempty" xmlrpc:"validFilesystemTypeCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ValidFilesystemTypes []Configuration_Storage_Filesystem_Type `json:"validFilesystemTypes,omitempty" xmlrpc:"validFilesystemTypes,omitempty"`
|
||||
|
||||
// The version of this specific piece of software.
|
||||
Version *string `json:"version,omitempty" xmlrpc:"version,omitempty"`
|
||||
|
||||
// This is set to '1' if this Software Description can be licensed to a Virtual Machine (an IP address).
|
||||
VirtualLicense *int `json:"virtualLicense,omitempty" xmlrpc:"virtualLicense,omitempty"`
|
||||
|
||||
// This is set to '1' if this Software Description a platform for hosting virtual servers.
|
||||
VirtualizationPlatform *int `json:"virtualizationPlatform,omitempty" xmlrpc:"virtualizationPlatform,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Description_Attribute data type represents an attributes associated with this software description.
|
||||
type Software_Description_Attribute struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Type *Software_Description_Attribute_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// The value that was assigned to this attribute.
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Description_Attribute_Type data type represents the type of an attribute.
|
||||
type Software_Description_Attribute_Type struct {
|
||||
Entity
|
||||
|
||||
// The keyname for this attribute type.
|
||||
Keyname *string `json:"keyname,omitempty" xmlrpc:"keyname,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Software_Description_Feature data type represents a single software description feature. A feature may show up on more than one software description and can not be created, modified, or removed.
|
||||
type Software_Description_Feature struct {
|
||||
Entity
|
||||
|
||||
// The unique identifier for a software description feature.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A unique name used to reference this software description feature.
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// The name of a software description feature.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The vendor that a software description feature belongs to.
|
||||
Vendor *string `json:"vendor,omitempty" xmlrpc:"vendor,omitempty"`
|
||||
}
|
||||
|
||||
// This class represents a software description's required user
|
||||
type Software_Description_RequiredUser struct {
|
||||
Entity
|
||||
|
||||
// If the default password is set the user will be created with that password, otherwise a random password is generated.
|
||||
DefaultPassword *string `json:"defaultPassword,omitempty" xmlrpc:"defaultPassword,omitempty"`
|
||||
|
||||
// If this software has a required user (such as "root") this string contains it's name.
|
||||
Username *string `json:"username,omitempty" xmlrpc:"username,omitempty"`
|
||||
}
|
||||
|
||||
// This class describes a specific type of license, like a Microsoft Windows Site License, a GPL license, or a license of another type.
|
||||
type Software_License struct {
|
||||
Entity
|
||||
|
||||
// The account that owns this specific License instance.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// An ID number for this specific License type.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The account that owns this specific License instance.
|
||||
Owner *Account `json:"owner,omitempty" xmlrpc:"owner,omitempty"`
|
||||
|
||||
// A Description of the software that this license instance is valid for.
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// The ID number of a Software Description that this specific license is valid for.
|
||||
SoftwareDescriptionId *int `json:"softwareDescriptionId,omitempty" xmlrpc:"softwareDescriptionId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed".
|
||||
type Software_VirtualLicense struct {
|
||||
Entity
|
||||
|
||||
// The customer account this Virtual License belongs to.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// The ID of the SoftLayer Account to which this Virtual License belongs to.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// The billing item for a software virtual license.
|
||||
BillingItem *Billing_Item `json:"billingItem,omitempty" xmlrpc:"billingItem,omitempty"`
|
||||
|
||||
// The hardware record to which the software virtual license is assigned.
|
||||
HostHardware *Hardware_Server `json:"hostHardware,omitempty" xmlrpc:"hostHardware,omitempty"`
|
||||
|
||||
// The ID of the SoftLayer Hardware Server record to which this Virtual License belongs.
|
||||
HostHardwareId *int `json:"hostHardwareId,omitempty" xmlrpc:"hostHardwareId,omitempty"`
|
||||
|
||||
// An ID number for this Virtual License instance.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The specific IP address this Virtual License belongs to.
|
||||
IpAddress *string `json:"ipAddress,omitempty" xmlrpc:"ipAddress,omitempty"`
|
||||
|
||||
// The IP Address record associated with a virtual license.
|
||||
IpAddressRecord *Network_Subnet_IpAddress `json:"ipAddressRecord,omitempty" xmlrpc:"ipAddressRecord,omitempty"`
|
||||
|
||||
// The License Key for this specific Virtual License.
|
||||
Key *string `json:"key,omitempty" xmlrpc:"key,omitempty"`
|
||||
|
||||
// A "notes" string attached to this specific Virtual License.
|
||||
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
|
||||
|
||||
// The SoftLayer_Software_Description that this virtual license is for.
|
||||
SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"`
|
||||
|
||||
// The Software Description ID this Virtual License is for.
|
||||
SoftwareDescriptionId *int `json:"softwareDescriptionId,omitempty" xmlrpc:"softwareDescriptionId,omitempty"`
|
||||
|
||||
// The subnet this Virtual License's IP address belongs to.
|
||||
Subnet *Network_Subnet `json:"subnet,omitempty" xmlrpc:"subnet,omitempty"`
|
||||
|
||||
// The ID of the SoftLayer Network Subnet this Virtual License belongs to.
|
||||
SubnetId *int `json:"subnetId,omitempty" xmlrpc:"subnetId,omitempty"`
|
||||
}
|
150
vendor/github.com/softlayer/softlayer-go/datatypes/survey.go
generated
vendored
Normal file
150
vendor/github.com/softlayer/softlayer-go/datatypes/survey.go
generated
vendored
Normal file
|
@ -0,0 +1,150 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Survey data type contains general information relating to a single SoftLayer survey.
|
||||
type Survey struct {
|
||||
Entity
|
||||
|
||||
// A flag indicating if a survey can be taken.
|
||||
Active *int `json:"active,omitempty" xmlrpc:"active,omitempty"`
|
||||
|
||||
// The date that a survey had originally started.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A survey's id.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A survey's name or title.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of the questions for a survey.
|
||||
QuestionCount *uint `json:"questionCount,omitempty" xmlrpc:"questionCount,omitempty"`
|
||||
|
||||
// The questions for a survey.
|
||||
Questions []Survey_Question `json:"questions,omitempty" xmlrpc:"questions,omitempty"`
|
||||
|
||||
// The status of the survey
|
||||
Status *Survey_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// The status id of the survey.
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// The type of survey
|
||||
Type *Survey_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
|
||||
// The type id of the survey.
|
||||
TypeId *int `json:"typeId,omitempty" xmlrpc:"typeId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Survey_Answer data type contains general information relating to a single SoftLayer survey answer.
|
||||
type Survey_Answer struct {
|
||||
Entity
|
||||
|
||||
// A survey answer's answer that a user can response too.
|
||||
Answer *string `json:"answer,omitempty" xmlrpc:"answer,omitempty"`
|
||||
|
||||
// A value indicating the order in when a survey answer will be displayed to a user.
|
||||
AnswerOrder *int `json:"answerOrder,omitempty" xmlrpc:"answerOrder,omitempty"`
|
||||
|
||||
// A survey answer's Id.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The survey question that this answer belongs to.
|
||||
SurveyQuestion *Survey_Question `json:"surveyQuestion,omitempty" xmlrpc:"surveyQuestion,omitempty"`
|
||||
|
||||
// A survey answer's associated [[SoftLayer_Survey_Question|Survey Question]] Id.
|
||||
SurveyQuestionId *int `json:"surveyQuestionId,omitempty" xmlrpc:"surveyQuestionId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Survey_Question data type contains general information relating to a single SoftLayer survey question.
|
||||
type Survey_Question struct {
|
||||
Entity
|
||||
|
||||
// A count of the possible answers for a survey question.
|
||||
AnswerCount *uint `json:"answerCount,omitempty" xmlrpc:"answerCount,omitempty"`
|
||||
|
||||
// The possible answers for a survey question.
|
||||
Answers []Survey_Answer `json:"answers,omitempty" xmlrpc:"answers,omitempty"`
|
||||
|
||||
// A survey question's Id.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A flag indicating that a survey question requires a response.
|
||||
IsRequired *int `json:"isRequired,omitempty" xmlrpc:"isRequired,omitempty"`
|
||||
|
||||
// A flag indicating that a survey question can have multiple answers responded to.
|
||||
MultiAnswer *int `json:"multiAnswer,omitempty" xmlrpc:"multiAnswer,omitempty"`
|
||||
|
||||
// A survey question's question.
|
||||
Question *string `json:"question,omitempty" xmlrpc:"question,omitempty"`
|
||||
|
||||
// A value indicating the order in when a survey question will be asked.
|
||||
QuestionOrder *int `json:"questionOrder,omitempty" xmlrpc:"questionOrder,omitempty"`
|
||||
|
||||
// The survey that a question belongs to.
|
||||
Survey *Survey `json:"survey,omitempty" xmlrpc:"survey,omitempty"`
|
||||
|
||||
// A survey question's associated [[SoftLayer_Survey|Survey]] Id.
|
||||
SurveyId *int `json:"surveyId,omitempty" xmlrpc:"surveyId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Survey_Response data type contains general information relating to a single SoftLayer survey response.
|
||||
type Survey_Response struct {
|
||||
Entity
|
||||
|
||||
// The user typed response for the [[SoftLayer_Survey_Answer|Survey Answer]] that a response is associated with.
|
||||
OtherAnswer *string `json:"otherAnswer,omitempty" xmlrpc:"otherAnswer,omitempty"`
|
||||
|
||||
// The survey answer that this response was to.
|
||||
SurveyAnswer *Survey_Answer `json:"surveyAnswer,omitempty" xmlrpc:"surveyAnswer,omitempty"`
|
||||
|
||||
// The Id of the [[SoftLayer_Survey_Answer|Survey Answer]] that a response was made for.
|
||||
SurveyAnswerId *int `json:"surveyAnswerId,omitempty" xmlrpc:"surveyAnswerId,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Survey_Status data type contains survey status information.
|
||||
type Survey_Status struct {
|
||||
Entity
|
||||
|
||||
// Description of a survey status
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a survey status
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name of a survey status
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Survey_Type data type contains survey type information.
|
||||
type Survey_Type struct {
|
||||
Entity
|
||||
|
||||
// Description of a survey type
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// Internal identifier of a survey type
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Name of a survey type
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
149
vendor/github.com/softlayer/softlayer-go/datatypes/tag.go
generated
vendored
Normal file
149
vendor/github.com/softlayer/softlayer-go/datatypes/tag.go
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Tag data type is an optional type associated with hardware. The account ID that the tag is tied to, and the tag itself are stored in this data type. There is also a flag to denote whether the tag is internal or not.
|
||||
type Tag struct {
|
||||
Entity
|
||||
|
||||
// The account to which the tag is tied.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// Account the tag belongs to.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// Unique identifier for a tag.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// Indicates whether a tag is internal.
|
||||
Internal *int `json:"internal,omitempty" xmlrpc:"internal,omitempty"`
|
||||
|
||||
// Name of the tag. The characters permitted are A-Z, 0-9, whitespace, _ (underscore),
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of references that tie object to the tag.
|
||||
ReferenceCount *uint `json:"referenceCount,omitempty" xmlrpc:"referenceCount,omitempty"`
|
||||
|
||||
// References that tie object to the tag.
|
||||
References []Tag_Reference `json:"references,omitempty" xmlrpc:"references,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Customer *User_Customer `json:"customer,omitempty" xmlrpc:"customer,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EmpRecordId *int `json:"empRecordId,omitempty" xmlrpc:"empRecordId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Employee *User_Employee `json:"employee,omitempty" xmlrpc:"employee,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResourceTableId *int `json:"resourceTableId,omitempty" xmlrpc:"resourceTableId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Tag *Tag `json:"tag,omitempty" xmlrpc:"tag,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TagId *int `json:"tagId,omitempty" xmlrpc:"tagId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TagType *Tag_Type `json:"tagType,omitempty" xmlrpc:"tagType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TagTypeId *int `json:"tagTypeId,omitempty" xmlrpc:"tagTypeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
UsrRecordId *int `json:"usrRecordId,omitempty" xmlrpc:"usrRecordId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Hardware struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Hardware `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Network_Application_Delivery_Controller struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Network_Application_Delivery_Controller `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Network_Vlan struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Network_Vlan `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Network_Vlan_Firewall struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Network_Vlan_Firewall `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Resource_Group struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Resource_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Virtual_Guest struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Virtual_Guest `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Reference_Virtual_Guest_Block_Device_Template_Group struct {
|
||||
Tag_Reference
|
||||
|
||||
// no documentation yet
|
||||
Resource *Virtual_Guest_Block_Device_Template_Group `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Tag_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
}
|
702
vendor/github.com/softlayer/softlayer-go/datatypes/ticket.go
generated
vendored
Normal file
702
vendor/github.com/softlayer/softlayer-go/datatypes/ticket.go
generated
vendored
Normal file
|
@ -0,0 +1,702 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// The SoftLayer_Ticket data type models a single SoftLayer customer support or notification ticket. Each ticket object contains references to it's updates, the user it's assigned to, the SoftLayer department and employee that it's assigned to, and any hardware objects or attached files associated with the ticket. Tickets are described in further detail on the [[SoftLayer_Ticket]] service page.
|
||||
//
|
||||
// To create a support ticket execute the [[SoftLayer_Ticket::createStandardTicket|createStandardTicket]] or [[SoftLayer_Ticket::createAdministrativeTicket|createAdministrativeTicket]] methods in the SoftLayer_Ticket service. To create an upgrade ticket for the SoftLayer sales group execute the [[SoftLayer_Ticket::createUpgradeTicket|createUpgradeTicket]].
|
||||
type Ticket struct {
|
||||
Entity
|
||||
|
||||
// The SoftLayer customer account associated with a ticket.
|
||||
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`
|
||||
|
||||
// An internal identifier of the SoftLayer customer account that a ticket is associated with.
|
||||
AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"`
|
||||
|
||||
// A count of
|
||||
AssignedAgentCount *uint `json:"assignedAgentCount,omitempty" xmlrpc:"assignedAgentCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AssignedAgents []User_Customer `json:"assignedAgents,omitempty" xmlrpc:"assignedAgents,omitempty"`
|
||||
|
||||
// The portal user that a ticket is assigned to.
|
||||
AssignedUser *User_Customer `json:"assignedUser,omitempty" xmlrpc:"assignedUser,omitempty"`
|
||||
|
||||
// An internal identifier of the portal user that a ticket is assigned to.
|
||||
AssignedUserId *int `json:"assignedUserId,omitempty" xmlrpc:"assignedUserId,omitempty"`
|
||||
|
||||
// A count of the list of additional emails to notify when a ticket update is made.
|
||||
AttachedAdditionalEmailCount *uint `json:"attachedAdditionalEmailCount,omitempty" xmlrpc:"attachedAdditionalEmailCount,omitempty"`
|
||||
|
||||
// The list of additional emails to notify when a ticket update is made.
|
||||
AttachedAdditionalEmails []User_Customer_AdditionalEmail `json:"attachedAdditionalEmails,omitempty" xmlrpc:"attachedAdditionalEmails,omitempty"`
|
||||
|
||||
// A count of the Dedicated Hosts associated with a ticket. This is used in cases where a ticket is directly associated with one or more Dedicated Hosts.
|
||||
AttachedDedicatedHostCount *uint `json:"attachedDedicatedHostCount,omitempty" xmlrpc:"attachedDedicatedHostCount,omitempty"`
|
||||
|
||||
// The Dedicated Hosts associated with a ticket. This is used in cases where a ticket is directly associated with one or more Dedicated Hosts.
|
||||
AttachedDedicatedHosts []Virtual_DedicatedHost `json:"attachedDedicatedHosts,omitempty" xmlrpc:"attachedDedicatedHosts,omitempty"`
|
||||
|
||||
// A count of the files attached to a ticket.
|
||||
AttachedFileCount *uint `json:"attachedFileCount,omitempty" xmlrpc:"attachedFileCount,omitempty"`
|
||||
|
||||
// The files attached to a ticket.
|
||||
AttachedFiles []Ticket_Attachment_File `json:"attachedFiles,omitempty" xmlrpc:"attachedFiles,omitempty"`
|
||||
|
||||
// The hardware associated with a ticket. This is used in cases where a ticket is directly associated with one or more pieces of hardware.
|
||||
AttachedHardware []Hardware `json:"attachedHardware,omitempty" xmlrpc:"attachedHardware,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AttachedHardwareCount *uint `json:"attachedHardwareCount,omitempty" xmlrpc:"attachedHardwareCount,omitempty"`
|
||||
|
||||
// A count of
|
||||
AttachedResourceCount *uint `json:"attachedResourceCount,omitempty" xmlrpc:"attachedResourceCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
AttachedResources []Ticket_Attachment `json:"attachedResources,omitempty" xmlrpc:"attachedResources,omitempty"`
|
||||
|
||||
// A count of the virtual guests associated with a ticket. This is used in cases where a ticket is directly associated with one or more virtualized guests installations or Virtual Servers.
|
||||
AttachedVirtualGuestCount *uint `json:"attachedVirtualGuestCount,omitempty" xmlrpc:"attachedVirtualGuestCount,omitempty"`
|
||||
|
||||
// The virtual guests associated with a ticket. This is used in cases where a ticket is directly associated with one or more virtualized guests installations or Virtual Servers.
|
||||
AttachedVirtualGuests []Virtual_Guest `json:"attachedVirtualGuests,omitempty" xmlrpc:"attachedVirtualGuests,omitempty"`
|
||||
|
||||
// Ticket is waiting on a response from a customer flag.
|
||||
AwaitingUserResponseFlag *bool `json:"awaitingUserResponseFlag,omitempty" xmlrpc:"awaitingUserResponseFlag,omitempty"`
|
||||
|
||||
// Whether a ticket has a one-time charge associated with it. Standard tickets are free while administrative tickets typically cost $3 USD.
|
||||
BillableFlag *bool `json:"billableFlag,omitempty" xmlrpc:"billableFlag,omitempty"`
|
||||
|
||||
// A service cancellation request.
|
||||
CancellationRequest *Billing_Item_Cancellation_Request `json:"cancellationRequest,omitempty" xmlrpc:"cancellationRequest,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ChangeOwnerFlag *bool `json:"changeOwnerFlag,omitempty" xmlrpc:"changeOwnerFlag,omitempty"`
|
||||
|
||||
// The date that a ticket was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A count of
|
||||
EmployeeAttachmentCount *uint `json:"employeeAttachmentCount,omitempty" xmlrpc:"employeeAttachmentCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EmployeeAttachments []User_Employee `json:"employeeAttachments,omitempty" xmlrpc:"employeeAttachments,omitempty"`
|
||||
|
||||
// Feedback left by a portal or API user on their experiences in a ticket. Final comments may be created after a ticket is closed.
|
||||
FinalComments *string `json:"finalComments,omitempty" xmlrpc:"finalComments,omitempty"`
|
||||
|
||||
// The first physical or virtual server attached to a ticket.
|
||||
FirstAttachedResource *Ticket_Attachment `json:"firstAttachedResource,omitempty" xmlrpc:"firstAttachedResource,omitempty"`
|
||||
|
||||
// The first update made to a ticket. This is typically the contents of a ticket when it's created.
|
||||
FirstUpdate *Ticket_Update `json:"firstUpdate,omitempty" xmlrpc:"firstUpdate,omitempty"`
|
||||
|
||||
// The SoftLayer department that a ticket is assigned to.
|
||||
Group *Ticket_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// The internal identifier of the SoftLayer department that a ticket is assigned to.
|
||||
GroupId *int `json:"groupId,omitempty" xmlrpc:"groupId,omitempty"`
|
||||
|
||||
// A ticket's internal identifier. Each ticket is defined by a unique identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A count of the invoice items associated with a ticket. Ticket based invoice items only exist when a ticket incurs a fee that has been invoiced.
|
||||
InvoiceItemCount *uint `json:"invoiceItemCount,omitempty" xmlrpc:"invoiceItemCount,omitempty"`
|
||||
|
||||
// The invoice items associated with a ticket. Ticket based invoice items only exist when a ticket incurs a fee that has been invoiced.
|
||||
InvoiceItems []Billing_Invoice_Item `json:"invoiceItems,omitempty" xmlrpc:"invoiceItems,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LastActivity *Ticket_Activity `json:"lastActivity,omitempty" xmlrpc:"lastActivity,omitempty"`
|
||||
|
||||
// The date that a ticket was last modified. A modification does not necessarily mean that an update was added.
|
||||
LastEditDate *Time `json:"lastEditDate,omitempty" xmlrpc:"lastEditDate,omitempty"`
|
||||
|
||||
// The type of user who last edited or updated a ticket. This is either "EMPLOYEE" or "USER".
|
||||
LastEditType *string `json:"lastEditType,omitempty" xmlrpc:"lastEditType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
LastEditor *User_Interface `json:"lastEditor,omitempty" xmlrpc:"lastEditor,omitempty"`
|
||||
|
||||
// The date that the last ticket update was made
|
||||
LastResponseDate *Time `json:"lastResponseDate,omitempty" xmlrpc:"lastResponseDate,omitempty"`
|
||||
|
||||
// The last update made to a ticket.
|
||||
LastUpdate *Ticket_Update `json:"lastUpdate,omitempty" xmlrpc:"lastUpdate,omitempty"`
|
||||
|
||||
// A timestamp of the last time the Ticket was viewed by the active user.
|
||||
LastViewedDate *Time `json:"lastViewedDate,omitempty" xmlrpc:"lastViewedDate,omitempty"`
|
||||
|
||||
// A ticket's associated location within the SoftLayer location hierarchy.
|
||||
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`
|
||||
|
||||
// The internal identifier of the location associated with a ticket.
|
||||
LocationId *int `json:"locationId,omitempty" xmlrpc:"locationId,omitempty"`
|
||||
|
||||
// The date that a ticket was last updated.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// True if there are new, unread updates to this ticket for the current user, False otherwise.
|
||||
NewUpdatesFlag *bool `json:"newUpdatesFlag,omitempty" xmlrpc:"newUpdatesFlag,omitempty"`
|
||||
|
||||
// Whether or not the user who owns a ticket is notified via email when a ticket is updated.
|
||||
NotifyUserOnUpdateFlag *bool `json:"notifyUserOnUpdateFlag,omitempty" xmlrpc:"notifyUserOnUpdateFlag,omitempty"`
|
||||
|
||||
// The IP address of the user who opened a ticket.
|
||||
OriginatingIpAddress *string `json:"originatingIpAddress,omitempty" xmlrpc:"originatingIpAddress,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Priority *int `json:"priority,omitempty" xmlrpc:"priority,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ResponsibleBrandId *int `json:"responsibleBrandId,omitempty" xmlrpc:"responsibleBrandId,omitempty"`
|
||||
|
||||
// A count of
|
||||
ScheduledActionCount *uint `json:"scheduledActionCount,omitempty" xmlrpc:"scheduledActionCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ScheduledActions []Provisioning_Version1_Transaction `json:"scheduledActions,omitempty" xmlrpc:"scheduledActions,omitempty"`
|
||||
|
||||
// The amount of money in US Dollars ($USD) that a ticket has charged to an account. A ticket's administrative billing amount is a one time charge and only applies to administrative support tickets.
|
||||
ServerAdministrationBillingAmount *int `json:"serverAdministrationBillingAmount,omitempty" xmlrpc:"serverAdministrationBillingAmount,omitempty"`
|
||||
|
||||
// The invoice associated with a ticket. Only tickets with an associated administrative charge have an invoice.
|
||||
ServerAdministrationBillingInvoice *Billing_Invoice `json:"serverAdministrationBillingInvoice,omitempty" xmlrpc:"serverAdministrationBillingInvoice,omitempty"`
|
||||
|
||||
// The internal identifier of the invoice associated with a ticket's administrative charge. Only tickets with an administrative charge have an associated invoice.
|
||||
ServerAdministrationBillingInvoiceId *int `json:"serverAdministrationBillingInvoiceId,omitempty" xmlrpc:"serverAdministrationBillingInvoiceId,omitempty"`
|
||||
|
||||
// Whether a ticket is a standard or an administrative support ticket. Administrative support tickets typically incur a $3 USD charge.
|
||||
ServerAdministrationFlag *int `json:"serverAdministrationFlag,omitempty" xmlrpc:"serverAdministrationFlag,omitempty"`
|
||||
|
||||
// The refund invoice associated with a ticket. Only tickets with a refund applied in them have an associated refund invoice.
|
||||
ServerAdministrationRefundInvoice *Billing_Invoice `json:"serverAdministrationRefundInvoice,omitempty" xmlrpc:"serverAdministrationRefundInvoice,omitempty"`
|
||||
|
||||
// The internal identifier of the refund invoice associated with a ticket. Only tickets with an account refund associated with them have an associated refund invoice.
|
||||
ServerAdministrationRefundInvoiceId *int `json:"serverAdministrationRefundInvoiceId,omitempty" xmlrpc:"serverAdministrationRefundInvoiceId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ServiceProvider *Service_Provider `json:"serviceProvider,omitempty" xmlrpc:"serviceProvider,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ServiceProviderId *int `json:"serviceProviderId,omitempty" xmlrpc:"serviceProviderId,omitempty"`
|
||||
|
||||
// A ticket's internal identifier at its service provider. Each ticket is defined by a unique identifier.
|
||||
ServiceProviderResourceId *int `json:"serviceProviderResourceId,omitempty" xmlrpc:"serviceProviderResourceId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
State []Ticket_State `json:"state,omitempty" xmlrpc:"state,omitempty"`
|
||||
|
||||
// A count of
|
||||
StateCount *uint `json:"stateCount,omitempty" xmlrpc:"stateCount,omitempty"`
|
||||
|
||||
// A ticket's status.
|
||||
Status *Ticket_Status `json:"status,omitempty" xmlrpc:"status,omitempty"`
|
||||
|
||||
// A ticket status' internal identifier.
|
||||
StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"`
|
||||
|
||||
// A ticket's subject. Only standard support tickets have an associated subject. A standard support ticket's title corresponds with it's subject's name.
|
||||
Subject *Ticket_Subject `json:"subject,omitempty" xmlrpc:"subject,omitempty"`
|
||||
|
||||
// An internal identifier of the pre-set subject that a ticket is associated with. Standard support tickets have a subject set while administrative tickets have a null subject. A standard support ticket's title is the name of it's associated subject.
|
||||
SubjectId *int `json:"subjectId,omitempty" xmlrpc:"subjectId,omitempty"`
|
||||
|
||||
// A count of
|
||||
TagReferenceCount *uint `json:"tagReferenceCount,omitempty" xmlrpc:"tagReferenceCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TagReferences []Tag_Reference `json:"tagReferences,omitempty" xmlrpc:"tagReferences,omitempty"`
|
||||
|
||||
// A ticket's title. This is typically a brief summary of the issue described in the ticket.
|
||||
Title *string `json:"title,omitempty" xmlrpc:"title,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TotalUpdateCount *int `json:"totalUpdateCount,omitempty" xmlrpc:"totalUpdateCount,omitempty"`
|
||||
|
||||
// A count of a ticket's updates.
|
||||
UpdateCount *uint `json:"updateCount,omitempty" xmlrpc:"updateCount,omitempty"`
|
||||
|
||||
// A ticket's updates.
|
||||
Updates []Ticket_Update `json:"updates,omitempty" xmlrpc:"updates,omitempty"`
|
||||
|
||||
// Whether a user is able to update a ticket.
|
||||
UserEditableFlag *bool `json:"userEditableFlag,omitempty" xmlrpc:"userEditableFlag,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Activity struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CreateTimestamp *Time `json:"createTimestamp,omitempty" xmlrpc:"createTimestamp,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Editor *User_Interface `json:"editor,omitempty" xmlrpc:"editor,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketUpdate *Ticket_Update `json:"ticketUpdate,omitempty" xmlrpc:"ticketUpdate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer tickets have the ability to be associated with specific pieces of hardware in a customer's inventory. Attaching hardware to a ticket can greatly increase response time from SoftLayer for issues that are related to one or more specific servers on a customer's account. The SoftLayer_Ticket_Attachment_Hardware data type models the relationship between a piece of hardware and a ticket. Only one attachment record may exist per hardware item per ticket.
|
||||
type Ticket_Attachment struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
AssignedAgent *User_Customer `json:"assignedAgent,omitempty" xmlrpc:"assignedAgent,omitempty"`
|
||||
|
||||
// The internal identifier of an item that is attached to a ticket.
|
||||
AttachmentId *int `json:"attachmentId,omitempty" xmlrpc:"attachmentId,omitempty"`
|
||||
|
||||
// The date that an item was attached to a ticket.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// A ticket attachment's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
ScheduledAction *Provisioning_Version1_Transaction `json:"scheduledAction,omitempty" xmlrpc:"scheduledAction,omitempty"`
|
||||
|
||||
// The ticket that an item is attached to.
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// The internal identifier of the ticket that an item is attached to.
|
||||
TicketId *int `json:"ticketId,omitempty" xmlrpc:"ticketId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Attachment_Assigned_Agent struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The internal identifier of an assigned Agent that is attached to a ticket.
|
||||
AssignedAgentId *int `json:"assignedAgentId,omitempty" xmlrpc:"assignedAgentId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Resource *User_Customer `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// This datatype contains tickets referenced from card change request
|
||||
type Ticket_Attachment_CardChangeRequest struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The card change request that is attached to a ticket.
|
||||
Resource *Billing_Payment_Card_ChangeRequest `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer tickets have the ability to be associated with specific pieces of dedicated hosts in a customer's inventory. Attaching a dedicated host to a ticket can greatly increase response time from SoftLayer for issues that are related to one or more specific servers on a customer's account. The SoftLayer_Ticket_Attachment_Dedicated_Host data type models the relationship between a dedicated host and a ticket. Only one attachment record may exist per dedicated host item per ticket.
|
||||
type Ticket_Attachment_Dedicated_Host struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The Dedicated Host that is attached to a ticket.
|
||||
DedicatedHost *Virtual_DedicatedHost `json:"dedicatedHost,omitempty" xmlrpc:"dedicatedHost,omitempty"`
|
||||
|
||||
// The internal identifier of the Dedicated Host that is attached to a ticket.
|
||||
DedicatedHostId *int `json:"dedicatedHostId,omitempty" xmlrpc:"dedicatedHostId,omitempty"`
|
||||
|
||||
// The Dedicated Host that is attached to a ticket.
|
||||
Resource *Virtual_DedicatedHost `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer tickets can have have files attached to them. Attaching a file to a ticket is a good way to report issues, provide documentation, and give examples of an issue. Both SoftLayer customers and employees have the ability to attach files to a ticket. The SoftLayer_Ticket_Attachment_File data type models a single file attached to a ticket.
|
||||
type Ticket_Attachment_File struct {
|
||||
Entity
|
||||
|
||||
// The date a file was originally attached to a ticket.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The name of a file attached to a ticket.
|
||||
FileName *string `json:"fileName,omitempty" xmlrpc:"fileName,omitempty"`
|
||||
|
||||
// The size of a file attached to a ticket, measured in bytes.
|
||||
FileSize *string `json:"fileSize,omitempty" xmlrpc:"fileSize,omitempty"`
|
||||
|
||||
// A ticket file attachment's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The date that a file attachment record was last modified.
|
||||
ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// The internal identifier of the ticket that a file is attached to.
|
||||
TicketId *int `json:"ticketId,omitempty" xmlrpc:"ticketId,omitempty"`
|
||||
|
||||
// The ticket that a file is attached to.
|
||||
Update *Ticket_Update `json:"update,omitempty" xmlrpc:"update,omitempty"`
|
||||
|
||||
// The internal identifier of the ticket update the attached file is associated with.
|
||||
UpdateId *int `json:"updateId,omitempty" xmlrpc:"updateId,omitempty"`
|
||||
|
||||
// The internal identifier of the user that uploaded a ticket file attachment. This is only used when A file attachment's ''uploaderType'' is set to "USER".
|
||||
UploaderId *string `json:"uploaderId,omitempty" xmlrpc:"uploaderId,omitempty"`
|
||||
|
||||
// The type of user that attached a file to a ticket. This is either "USER" if the file was uploaded by a portal or API user or "EMPLOYEE" if the file was uploaded by a SoftLayer employee.
|
||||
UploaderType *string `json:"uploaderType,omitempty" xmlrpc:"uploaderType,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer tickets have the ability to be associated with specific pieces of hardware in a customer's inventory. Attaching hardware to a ticket can greatly increase response time from SoftLayer for issues that are related to one or more specific servers on a customer's account. The SoftLayer_Ticket_Attachment_Hardware data type models the relationship between a piece of hardware and a ticket. Only one attachment record may exist per hardware item per ticket.
|
||||
type Ticket_Attachment_Hardware struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The hardware that is attached to a ticket.
|
||||
Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`
|
||||
|
||||
// The internal identifier of a piece of hardware that is attached to a ticket.
|
||||
HardwareId *int `json:"hardwareId,omitempty" xmlrpc:"hardwareId,omitempty"`
|
||||
|
||||
// The hardware that is attached to a ticket.
|
||||
Resource *Hardware `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// This datatype contains tickets referenced from manual payments
|
||||
type Ticket_Attachment_ManualPayment struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The manual payment that is attached to a ticket.
|
||||
Resource *Billing_Payment_Card_ManualPayment `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Attachment_Scheduled_Action struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// no documentation yet
|
||||
Resource *Provisioning_Version1_Transaction `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
|
||||
// The internal identifier of a scheduled action transaction that is attached to a ticket.
|
||||
RunDate *Time `json:"runDate,omitempty" xmlrpc:"runDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Transaction *Provisioning_Version1_Transaction `json:"transaction,omitempty" xmlrpc:"transaction,omitempty"`
|
||||
|
||||
// The internal identifier of a scheduled action transaction that is attached to a ticket.
|
||||
TransactionId *int `json:"transactionId,omitempty" xmlrpc:"transactionId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer tickets have the ability to be associated with specific virtual guests in a customer's inventory. Attaching virtual guests to a ticket can greatly increase response time from SoftLayer for issues that are related to one or more specific servers on a customer's account. The SoftLayer_Ticket_Attachment_Virtual_Guest data type models the relationship between a virtual guest and a ticket. Only one attachment record may exist per virtual guest per ticket.
|
||||
type Ticket_Attachment_Virtual_Guest struct {
|
||||
Ticket_Attachment
|
||||
|
||||
// The virtualized guest or CloudLayer Computing Instance that is attached to a ticket.
|
||||
Resource *Virtual_Guest `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
|
||||
|
||||
// The virtualized guest or CloudLayer Computing Instance that is attached to a ticket.
|
||||
VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"`
|
||||
|
||||
// The internal identifier of the virtualized guest or CloudLayer Computing Instance that is attached to a ticket.
|
||||
VirtualGuestId *int `json:"virtualGuestId,omitempty" xmlrpc:"virtualGuestId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Chat struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Agent *User_Employee `json:"agent,omitempty" xmlrpc:"agent,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Customer *User_Customer `json:"customer,omitempty" xmlrpc:"customer,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
CustomerId *int `json:"customerId,omitempty" xmlrpc:"customerId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
EndDate *Time `json:"endDate,omitempty" xmlrpc:"endDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StartDate *Time `json:"startDate,omitempty" xmlrpc:"startDate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketUpdate *Ticket_Update_Chat `json:"ticketUpdate,omitempty" xmlrpc:"ticketUpdate,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Transcript *string `json:"transcript,omitempty" xmlrpc:"transcript,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Chat_Liveperson struct {
|
||||
Ticket_Chat
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Chat_TranscriptLine struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Speaker *User_Interface `json:"speaker,omitempty" xmlrpc:"speaker,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Chat_TranscriptLine_Customer struct {
|
||||
Ticket_Chat_TranscriptLine
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Chat_TranscriptLine_Employee struct {
|
||||
Ticket_Chat_TranscriptLine
|
||||
}
|
||||
|
||||
// SoftLayer tickets have the ability to be assigned to one of SoftLayer's internal departments. The department that a ticket is assigned to is modeled by the SoftLayer_Ticket_Group data type. Ticket groups help to ensure that the proper department is handling a ticket. Standard support tickets are created from a number of pre-determined subjects. These subjects help determine which group a standard ticket is assigned to.
|
||||
type Ticket_Group struct {
|
||||
Entity
|
||||
|
||||
// The category that a ticket group belongs to.
|
||||
Category *Ticket_Group_Category `json:"category,omitempty" xmlrpc:"category,omitempty"`
|
||||
|
||||
// A ticket group's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A ticket group's name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// The internal identifier for the category that a ticket group belongs to..
|
||||
TicketGroupCategoryId *int `json:"ticketGroupCategoryId,omitempty" xmlrpc:"ticketGroupCategoryId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer's support ticket groups represent the department at SoftLayer that is assigned to work one of your support tickets. Many departments are responsible for handling different types of tickets. These types of tickets are modeled in the SoftLayer_Ticket_Group_Category data type. Ticket group categories also help separate differentiate your tickets' issues in the SoftLayer customer portal.
|
||||
type Ticket_Group_Category struct {
|
||||
Entity
|
||||
|
||||
// A ticket group category's unique identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A ticket group category's name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Priority struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_State struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StateType *Ticket_State_Type `json:"stateType,omitempty" xmlrpc:"stateType,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
StateTypeId *int `json:"stateTypeId,omitempty" xmlrpc:"stateTypeId,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
TicketId *int `json:"ticketId,omitempty" xmlrpc:"ticketId,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_State_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Ticket_Status data type models the state of a ticket as it is worked by SoftLayer and its customers. Tickets exist in one of three states:
|
||||
// *'''OPEN''': Open tickets are considered unresolved issues by SoftLayer and can be assigned to a SoftLayer employee for work. Tickets created by portal or API users are created in the Open state.
|
||||
// *'''ASSIGNED''': Assigned tickets are identical to open tickets, but are assigned to an individual SoftLayer employee. An assigned ticket is actively being worked by SoftLayer.
|
||||
// *'''CLOSED''': Tickets are closed when the issue at hand is considered resolved. A SoftLayer employee can change a ticket's status from Closed to Open or Assigned if the need arises.
|
||||
//
|
||||
//
|
||||
// A ticket usually goes from the Open to Assigned to Closed states during its life cycle. If a ticket is forwarded from one department to another it may change from the Assigned state back to Open until it is assigned to a member of the new department.
|
||||
type Ticket_Status struct {
|
||||
Entity
|
||||
|
||||
// A ticket status' internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A ticket status' name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Ticket_Subject data type models one of the possible subjects that a standard support ticket may belong to. A basic support ticket's title matches it's corresponding subject's name.
|
||||
type Ticket_Subject struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Category *Ticket_Subject_Category `json:"category,omitempty" xmlrpc:"category,omitempty"`
|
||||
|
||||
// The subject category id that this ticket subject belongs to.
|
||||
CategoryId *int `json:"categoryId,omitempty" xmlrpc:"categoryId,omitempty"`
|
||||
|
||||
// A child subject
|
||||
Children []Ticket_Subject `json:"children,omitempty" xmlrpc:"children,omitempty"`
|
||||
|
||||
// A count of a child subject
|
||||
ChildrenCount *uint `json:"childrenCount,omitempty" xmlrpc:"childrenCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Group *Ticket_Group `json:"group,omitempty" xmlrpc:"group,omitempty"`
|
||||
|
||||
// A ticket subject's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A ticket subject's name. This name is used for a standard support ticket's title.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A parent subject
|
||||
Parent *Ticket_Subject `json:"parent,omitempty" xmlrpc:"parent,omitempty"`
|
||||
|
||||
// Specifies the parent subject id.
|
||||
ParentId *int `json:"parentId,omitempty" xmlrpc:"parentId,omitempty"`
|
||||
}
|
||||
|
||||
// SoftLayer_Ticket_Subject_Category groups ticket subjects into logical group.
|
||||
type Ticket_Subject_Category struct {
|
||||
Entity
|
||||
|
||||
// A unique identifier of a ticket subject category.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// A ticket subject category name.
|
||||
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
|
||||
|
||||
// A count of
|
||||
SubjectCount *uint `json:"subjectCount,omitempty" xmlrpc:"subjectCount,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Subjects []Ticket_Subject `json:"subjects,omitempty" xmlrpc:"subjects,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Survey struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
}
|
||||
|
||||
// The SoftLayer_Ticket_Update type relates to a single update to a ticket, either by a customer or an employee.
|
||||
type Ticket_Update struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
ChangeOwnerActivity *string `json:"changeOwnerActivity,omitempty" xmlrpc:"changeOwnerActivity,omitempty"`
|
||||
|
||||
// The data a ticket update was created.
|
||||
CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"`
|
||||
|
||||
// The user or SoftLayer employee who created a ticket update.
|
||||
Editor *User_Interface `json:"editor,omitempty" xmlrpc:"editor,omitempty"`
|
||||
|
||||
// The internal identifier of the SoftLayer portal or API user who created a ticket update. This is only used if a ticket update's ''editorType'' property is "USER".
|
||||
EditorId *int `json:"editorId,omitempty" xmlrpc:"editorId,omitempty"`
|
||||
|
||||
// The type user who created a ticket update. This is either "USER" for an update created by a SoftLayer portal or API user, "EMPLOYEE" for an update created by a SoftLayer employee, or "AUTO" if a ticket update was generated automatically by SoftLayer's backend systems.
|
||||
EditorType *string `json:"editorType,omitempty" xmlrpc:"editorType,omitempty"`
|
||||
|
||||
// The contents of a ticket update.
|
||||
Entry *string `json:"entry,omitempty" xmlrpc:"entry,omitempty"`
|
||||
|
||||
// The files attached to a ticket update.
|
||||
FileAttachment []Ticket_Attachment_File `json:"fileAttachment,omitempty" xmlrpc:"fileAttachment,omitempty"`
|
||||
|
||||
// A count of the files attached to a ticket update.
|
||||
FileAttachmentCount *uint `json:"fileAttachmentCount,omitempty" xmlrpc:"fileAttachmentCount,omitempty"`
|
||||
|
||||
// A ticket update's internal identifier.
|
||||
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`
|
||||
|
||||
// The ticket that a ticket update belongs to.
|
||||
Ticket *Ticket `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
|
||||
// The internal identifier of the ticket that a ticket update belongs to.
|
||||
TicketId *int `json:"ticketId,omitempty" xmlrpc:"ticketId,omitempty"`
|
||||
|
||||
// The Type of update to this ticket
|
||||
Type *Ticket_Update_Type `json:"type,omitempty" xmlrpc:"type,omitempty"`
|
||||
}
|
||||
|
||||
// A SoftLayer_Ticket_Update_Agent type models an update to a ticket made by an agent.
|
||||
type Ticket_Update_Agent struct {
|
||||
Ticket_Update
|
||||
}
|
||||
|
||||
// A SoftLayer_Ticket_Update_Chat is a chat between a customer and a customer service representative relating to a ticket.
|
||||
type Ticket_Update_Chat struct {
|
||||
Ticket_Update
|
||||
|
||||
// The chat between the Customer and Agent
|
||||
Chat *Ticket_Chat_Liveperson `json:"chat,omitempty" xmlrpc:"chat,omitempty"`
|
||||
}
|
||||
|
||||
// A SoftLayer_Ticket_Update_Customer is a single update made by a customer to a ticket.
|
||||
type Ticket_Update_Customer struct {
|
||||
Ticket_Update
|
||||
}
|
||||
|
||||
// The SoftLayer_Ticket_Update_Employee data type models an update to a ticket made by a SoftLayer employee.
|
||||
type Ticket_Update_Employee struct {
|
||||
Ticket_Update
|
||||
|
||||
// A ticket update's response rating. Ticket updates posted by SoftLayer employees have the option of earning a rating from SoftLayer's customers. Ratings are based on a 1 - 5 scale, with one being a poor rating while 5 is a very high rating. This is only used if a ticket update's ''editorType'' property is "EMPLOYEE".
|
||||
ResponseRating *int `json:"responseRating,omitempty" xmlrpc:"responseRating,omitempty"`
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Ticket_Update_Type struct {
|
||||
Entity
|
||||
|
||||
// no documentation yet
|
||||
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`
|
||||
|
||||
// no documentation yet
|
||||
Ticket *Ticket_Update `json:"ticket,omitempty" xmlrpc:"ticket,omitempty"`
|
||||
}
|
1412
vendor/github.com/softlayer/softlayer-go/datatypes/user.go
generated
vendored
Normal file
1412
vendor/github.com/softlayer/softlayer-go/datatypes/user.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
46
vendor/github.com/softlayer/softlayer-go/datatypes/utility.go
generated
vendored
Normal file
46
vendor/github.com/softlayer/softlayer-go/datatypes/utility.go
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package datatypes
|
||||
|
||||
// Generic utility class used for gathering graphing parameters and actually creating graphs.
|
||||
type Utility_Bandwidth_Graph struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Utility_Network struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Utility_ObjectFilter struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Utility_ObjectFilter_Operation struct {
|
||||
Entity
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Utility_ObjectFilter_Operation_Option struct {
|
||||
Entity
|
||||
}
|
1313
vendor/github.com/softlayer/softlayer-go/datatypes/virtual.go
generated
vendored
Normal file
1313
vendor/github.com/softlayer/softlayer-go/datatypes/virtual.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
305
vendor/github.com/softlayer/softlayer-go/filter/filters.go
generated
vendored
Normal file
305
vendor/github.com/softlayer/softlayer-go/filter/filters.go
generated
vendored
Normal file
|
@ -0,0 +1,305 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// See reference at https://sldn.softlayer.com/article/object-filters.
|
||||
// Examples in the README.md file and in the examples directory.
|
||||
package filter
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Filter struct {
|
||||
Path string
|
||||
Op string
|
||||
Opts map[string]interface{}
|
||||
Val interface{}
|
||||
}
|
||||
|
||||
type Filters []Filter
|
||||
|
||||
// Returns an array of Filters that you can later call .Build() on.
|
||||
func New(args ...Filter) Filters {
|
||||
return args
|
||||
}
|
||||
|
||||
// This is like calling New().Build().
|
||||
// Returns a JSON string that can be used as the object filter.
|
||||
func Build(args ...Filter) string {
|
||||
filters := Filters{}
|
||||
|
||||
for _, arg := range args {
|
||||
filters = append(filters, arg)
|
||||
}
|
||||
|
||||
return filters.Build()
|
||||
}
|
||||
|
||||
// This creates a new Filter. The path is a dot-delimited path down
|
||||
// to the attribute this filter is for. The second value parameter
|
||||
// is optional.
|
||||
func Path(path string, val ...interface{}) Filter {
|
||||
if len(val) > 0 {
|
||||
return Filter{Path: path, Val: val[0]}
|
||||
}
|
||||
|
||||
return Filter{Path: path}
|
||||
}
|
||||
|
||||
// Builds the filter string in JSON format
|
||||
func (fs Filters) Build() string {
|
||||
// Loops around filters,
|
||||
// splitting path on '.' and looping around path pieces.
|
||||
// Idea is to create a map/tree like map[string]interface{}.
|
||||
// Every component in the path is a node to create in the tree.
|
||||
// Once we get to the leaf, we set the operation.
|
||||
// map[string]interface{}{"operation": op+" "+value}
|
||||
// If Op is "", then just map[string]interface{}{"operation": value}.
|
||||
// Afterwards, the Opts are traversed; []map[string]interface{}{}
|
||||
// For every entry in Opts, we create one map, and append it to an array of maps.
|
||||
// At the end, json.Marshal the whole thing.
|
||||
result := map[string]interface{}{}
|
||||
for _, filter := range fs {
|
||||
if filter.Path == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
cursor := result
|
||||
nodes := strings.Split(filter.Path, ".")
|
||||
for len(nodes) > 1 {
|
||||
branch := nodes[0]
|
||||
if _, ok := cursor[branch]; !ok {
|
||||
cursor[branch] = map[string]interface{}{}
|
||||
}
|
||||
cursor = cursor[branch].(map[string]interface{})
|
||||
nodes = nodes[1:len(nodes)]
|
||||
}
|
||||
|
||||
leaf := nodes[0]
|
||||
if filter.Val != nil {
|
||||
operation := filter.Val
|
||||
if filter.Op != "" {
|
||||
var format string
|
||||
switch filter.Val.(type) {
|
||||
case int:
|
||||
format = "%d"
|
||||
default:
|
||||
format = "%s"
|
||||
}
|
||||
operation = filter.Op + " " + fmt.Sprintf(format, filter.Val)
|
||||
}
|
||||
|
||||
cursor[leaf] = map[string]interface{}{
|
||||
"operation": operation,
|
||||
}
|
||||
}
|
||||
|
||||
if filter.Opts == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
options := []map[string]interface{}{}
|
||||
for name, value := range filter.Opts {
|
||||
options = append(options, map[string]interface{}{
|
||||
"name": name,
|
||||
"value": value,
|
||||
})
|
||||
}
|
||||
|
||||
cursor[leaf] = map[string]interface{}{
|
||||
"operation": filter.Op,
|
||||
"options": options,
|
||||
}
|
||||
}
|
||||
|
||||
jsonStr, _ := json.Marshal(result)
|
||||
return string(jsonStr)
|
||||
}
|
||||
|
||||
// Builds the filter string in JSON format
|
||||
func (f Filter) Build() string {
|
||||
return Build(f)
|
||||
}
|
||||
|
||||
// Add options to the filter. Can be chained for multiple options.
|
||||
func (f Filter) Opt(name string, value interface{}) Filter {
|
||||
if f.Opts == nil {
|
||||
f.Opts = map[string]interface{}{}
|
||||
}
|
||||
|
||||
f.Opts[name] = value
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is equal to the value
|
||||
func (f Filter) Eq(val interface{}) Filter {
|
||||
f.Op = ""
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is not equal to the value
|
||||
func (f Filter) NotEq(val interface{}) Filter {
|
||||
f.Op = "!="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is like the value
|
||||
func (f Filter) Like(val interface{}) Filter {
|
||||
f.Op = "~"
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is unlike value
|
||||
func (f Filter) NotLike(val interface{}) Filter {
|
||||
f.Op = "!~"
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is less than value
|
||||
func (f Filter) LessThan(val interface{}) Filter {
|
||||
f.Op = "<"
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is less than or equal to the value
|
||||
func (f Filter) LessThanOrEqual(val interface{}) Filter {
|
||||
f.Op = "<="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is greater than value
|
||||
func (f Filter) GreaterThan(val interface{}) Filter {
|
||||
f.Op = ">"
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is greater than or equal to value
|
||||
func (f Filter) GreaterThanOrEqual(val interface{}) Filter {
|
||||
f.Op = ">="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is null
|
||||
func (f Filter) IsNull() Filter {
|
||||
f.Op = ""
|
||||
f.Val = "is null"
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is not null
|
||||
func (f Filter) NotNull() Filter {
|
||||
f.Op = ""
|
||||
f.Val = "not null"
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property contains the value
|
||||
func (f Filter) Contains(val interface{}) Filter {
|
||||
f.Op = "*="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property does not contain the value
|
||||
func (f Filter) NotContains(val interface{}) Filter {
|
||||
f.Op = "!*="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property starts with the value
|
||||
func (f Filter) StartsWith(val interface{}) Filter {
|
||||
f.Op = "^="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property does not start with the value
|
||||
func (f Filter) NotStartsWith(val interface{}) Filter {
|
||||
f.Op = "!^="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property ends with the value
|
||||
func (f Filter) EndsWith(val interface{}) Filter {
|
||||
f.Op = "$="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property does not end with the value
|
||||
func (f Filter) NotEndsWith(val interface{}) Filter {
|
||||
f.Op = "!$="
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property is one of the values in args.
|
||||
func (f Filter) In(args ...interface{}) Filter {
|
||||
f.Op = "in"
|
||||
values := []interface{}{}
|
||||
for _, arg := range args {
|
||||
values = append(values, arg)
|
||||
}
|
||||
|
||||
return f.Opt("data", values)
|
||||
}
|
||||
|
||||
// Set this filter to test if property has a date older than the value in days.
|
||||
func (f Filter) DaysPast(val interface{}) Filter {
|
||||
f.Op = ">= currentDate -"
|
||||
f.Val = val
|
||||
return f
|
||||
}
|
||||
|
||||
// Set this filter to test if property has the exact date as the value.
|
||||
func (f Filter) Date(date string) Filter {
|
||||
f.Op = "isDate"
|
||||
f.Val = nil
|
||||
return f.Opt("date", []string{date})
|
||||
}
|
||||
|
||||
// Set this filter to test if property has a date before the value.
|
||||
func (f Filter) DateBefore(date string) Filter {
|
||||
f.Op = "lessThanDate"
|
||||
f.Val = nil
|
||||
return f.Opt("date", []string{date})
|
||||
}
|
||||
|
||||
// Set this filter to test if property has a date after the value.
|
||||
func (f Filter) DateAfter(date string) Filter {
|
||||
f.Op = "greaterThanDate"
|
||||
f.Val = nil
|
||||
return f.Opt("date", []string{date})
|
||||
}
|
||||
|
||||
// Set this filter to test if property has a date between the values.
|
||||
func (f Filter) DateBetween(start string, end string) Filter {
|
||||
f.Op = "betweenDate"
|
||||
f.Val = nil
|
||||
return f.Opt("startDate", []string{start}).Opt("endDate", []string{end})
|
||||
}
|
4602
vendor/github.com/softlayer/softlayer-go/services/account.go
generated
vendored
Normal file
4602
vendor/github.com/softlayer/softlayer-go/services/account.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
729
vendor/github.com/softlayer/softlayer-go/services/auxiliary.go
generated
vendored
Normal file
729
vendor/github.com/softlayer/softlayer-go/services/auxiliary.go
generated
vendored
Normal file
|
@ -0,0 +1,729 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Marketing_Event struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryMarketingEventService returns an instance of the Auxiliary_Marketing_Event SoftLayer service
|
||||
func GetAuxiliaryMarketingEventService(sess *session.Session) Auxiliary_Marketing_Event {
|
||||
return Auxiliary_Marketing_Event{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Marketing_Event) Id(id int) Auxiliary_Marketing_Event {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Marketing_Event) Mask(mask string) Auxiliary_Marketing_Event {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Marketing_Event) Filter(filter string) Auxiliary_Marketing_Event {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Marketing_Event) Limit(limit int) Auxiliary_Marketing_Event {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Marketing_Event) Offset(offset int) Auxiliary_Marketing_Event {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method will return a collection of SoftLayer_Auxiliary_Marketing_Event objects ordered in ascending order by start date.
|
||||
func (r Auxiliary_Marketing_Event) GetMarketingEvents() (resp []datatypes.Auxiliary_Marketing_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Marketing_Event", "getMarketingEvents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Auxiliary_Marketing_Event) GetObject() (resp datatypes.Auxiliary_Marketing_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Marketing_Event", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Network_Status struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryNetworkStatusService returns an instance of the Auxiliary_Network_Status SoftLayer service
|
||||
func GetAuxiliaryNetworkStatusService(sess *session.Session) Auxiliary_Network_Status {
|
||||
return Auxiliary_Network_Status{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Network_Status) Id(id int) Auxiliary_Network_Status {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Network_Status) Mask(mask string) Auxiliary_Network_Status {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Network_Status) Filter(filter string) Auxiliary_Network_Status {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Network_Status) Limit(limit int) Auxiliary_Network_Status {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Network_Status) Offset(offset int) Auxiliary_Network_Status {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Return the current network status of and latency information for a given target from numerous points around the world. Valid Targets:
|
||||
// * ALL
|
||||
// * NETWORK_DALLAS
|
||||
// * NETWORK_SEATTLE
|
||||
// * NETWORK_PUBLIC
|
||||
// * NETWORK_PUBLIC_DALLAS
|
||||
// * NETWORK_PUBLIC_SEATTLE
|
||||
// * NETWORK_PUBLIC_WDC
|
||||
// * NETWORK_PRIVATE
|
||||
// * NETWORK_PRIVATE_DALLAS
|
||||
// * NETWORK_PRIVATE_SEATTLE
|
||||
// * NETWORK_PRIVATE_WDC
|
||||
func (r Auxiliary_Network_Status) GetNetworkStatus(target *string) (resp []datatypes.Container_Auxiliary_Network_Status_Reading, err error) {
|
||||
params := []interface{}{
|
||||
target,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Network_Status", "getNetworkStatus", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A SoftLayer_Auxiliary_Notification_Emergency data object represents a notification event being broadcast to the SoftLayer customer base. It is used to provide information regarding outages or current known issues.
|
||||
type Auxiliary_Notification_Emergency struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryNotificationEmergencyService returns an instance of the Auxiliary_Notification_Emergency SoftLayer service
|
||||
func GetAuxiliaryNotificationEmergencyService(sess *session.Session) Auxiliary_Notification_Emergency {
|
||||
return Auxiliary_Notification_Emergency{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Notification_Emergency) Id(id int) Auxiliary_Notification_Emergency {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Notification_Emergency) Mask(mask string) Auxiliary_Notification_Emergency {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Notification_Emergency) Filter(filter string) Auxiliary_Notification_Emergency {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Notification_Emergency) Limit(limit int) Auxiliary_Notification_Emergency {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Notification_Emergency) Offset(offset int) Auxiliary_Notification_Emergency {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Notification_Emergency data types, which contain all notification events regardless of status.
|
||||
func (r Auxiliary_Notification_Emergency) GetAllObjects() (resp []datatypes.Auxiliary_Notification_Emergency, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Notification_Emergency data types, which contain all current notification events.
|
||||
func (r Auxiliary_Notification_Emergency) GetCurrentNotifications() (resp []datatypes.Auxiliary_Notification_Emergency, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getCurrentNotifications", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Notification_Emergency object, it can be used to check for current notifications being broadcast by SoftLayer.
|
||||
func (r Auxiliary_Notification_Emergency) GetObject() (resp datatypes.Auxiliary_Notification_Emergency, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The signature of the SoftLayer employee department associated with this notification.
|
||||
func (r Auxiliary_Notification_Emergency) GetSignature() (resp datatypes.Auxiliary_Notification_Emergency_Signature, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getSignature", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The status of this notification.
|
||||
func (r Auxiliary_Notification_Emergency) GetStatus() (resp datatypes.Auxiliary_Notification_Emergency_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Notification_Emergency", "getStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseService returns an instance of the Auxiliary_Press_Release SoftLayer service
|
||||
func GetAuxiliaryPressReleaseService(sess *session.Session) Auxiliary_Press_Release {
|
||||
return Auxiliary_Press_Release{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release) Id(id int) Auxiliary_Press_Release {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release) Mask(mask string) Auxiliary_Press_Release {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release) Filter(filter string) Auxiliary_Press_Release {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release) Limit(limit int) Auxiliary_Press_Release {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release) Offset(offset int) Auxiliary_Press_Release {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release) GetAbout() (resp []datatypes.Auxiliary_Press_Release_About_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getAbout", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Press_Release data types, which contain all press releases.
|
||||
func (r Auxiliary_Press_Release) GetAllObjects() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release) GetContacts() (resp []datatypes.Auxiliary_Press_Release_Contact_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getContacts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release) GetMediaPartners() (resp []datatypes.Auxiliary_Press_Release_Media_Partner_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getMediaPartners", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release) GetObject() (resp datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release) GetPressReleaseContent() (resp datatypes.Auxiliary_Press_Release_Content, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getPressReleaseContent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Press_Release data types, which contain all press releases.
|
||||
func (r Auxiliary_Press_Release) GetRenderedPressRelease() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getRenderedPressRelease", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Press_Release data types, which contain all press releases for a given year and or result limit.
|
||||
func (r Auxiliary_Press_Release) GetRenderedPressReleases(resultLimit *string, year *string) (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
params := []interface{}{
|
||||
resultLimit,
|
||||
year,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getRenderedPressReleases", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Auxiliary_Press_Release data types, which have the website highlight flag set.
|
||||
func (r Auxiliary_Press_Release) GetWebsiteHighlightPressReleases() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getWebsiteHighlightPressReleases", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_About struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseAboutService returns an instance of the Auxiliary_Press_Release_About SoftLayer service
|
||||
func GetAuxiliaryPressReleaseAboutService(sess *session.Session) Auxiliary_Press_Release_About {
|
||||
return Auxiliary_Press_Release_About{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About) Id(id int) Auxiliary_Press_Release_About {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About) Mask(mask string) Auxiliary_Press_Release_About {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About) Filter(filter string) Auxiliary_Press_Release_About {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About) Limit(limit int) Auxiliary_Press_Release_About {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About) Offset(offset int) Auxiliary_Press_Release_About {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_About object whose about id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_About) GetObject() (resp datatypes.Auxiliary_Press_Release_About, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_About", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_About_Press_Release struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseAboutPressReleaseService returns an instance of the Auxiliary_Press_Release_About_Press_Release SoftLayer service
|
||||
func GetAuxiliaryPressReleaseAboutPressReleaseService(sess *session.Session) Auxiliary_Press_Release_About_Press_Release {
|
||||
return Auxiliary_Press_Release_About_Press_Release{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) Id(id int) Auxiliary_Press_Release_About_Press_Release {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) Mask(mask string) Auxiliary_Press_Release_About_Press_Release {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) Filter(filter string) Auxiliary_Press_Release_About_Press_Release {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) Limit(limit int) Auxiliary_Press_Release_About_Press_Release {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) Offset(offset int) Auxiliary_Press_Release_About_Press_Release {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) GetAboutParagraphs() (resp []datatypes.Auxiliary_Press_Release_About, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_About_Press_Release", "getAboutParagraphs", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_About_Press_Release object whose contact id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) GetObject() (resp datatypes.Auxiliary_Press_Release_About_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_About_Press_Release", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_About_Press_Release) GetPressReleases() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_About_Press_Release", "getPressReleases", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Contact struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseContactService returns an instance of the Auxiliary_Press_Release_Contact SoftLayer service
|
||||
func GetAuxiliaryPressReleaseContactService(sess *session.Session) Auxiliary_Press_Release_Contact {
|
||||
return Auxiliary_Press_Release_Contact{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact) Id(id int) Auxiliary_Press_Release_Contact {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact) Mask(mask string) Auxiliary_Press_Release_Contact {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact) Filter(filter string) Auxiliary_Press_Release_Contact {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact) Limit(limit int) Auxiliary_Press_Release_Contact {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact) Offset(offset int) Auxiliary_Press_Release_Contact {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_Contact object whose contact id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_Contact) GetObject() (resp datatypes.Auxiliary_Press_Release_Contact, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Contact", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Contact_Press_Release struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseContactPressReleaseService returns an instance of the Auxiliary_Press_Release_Contact_Press_Release SoftLayer service
|
||||
func GetAuxiliaryPressReleaseContactPressReleaseService(sess *session.Session) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
return Auxiliary_Press_Release_Contact_Press_Release{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) Id(id int) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) Mask(mask string) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) Filter(filter string) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) Limit(limit int) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) Offset(offset int) Auxiliary_Press_Release_Contact_Press_Release {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) GetContacts() (resp []datatypes.Auxiliary_Press_Release_Contact, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Contact_Press_Release", "getContacts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_Contact object whose contact id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) GetObject() (resp datatypes.Auxiliary_Press_Release_Contact_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Contact_Press_Release", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_Contact_Press_Release) GetPressReleases() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Contact_Press_Release", "getPressReleases", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Content struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseContentService returns an instance of the Auxiliary_Press_Release_Content SoftLayer service
|
||||
func GetAuxiliaryPressReleaseContentService(sess *session.Session) Auxiliary_Press_Release_Content {
|
||||
return Auxiliary_Press_Release_Content{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Content) Id(id int) Auxiliary_Press_Release_Content {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Content) Mask(mask string) Auxiliary_Press_Release_Content {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Content) Filter(filter string) Auxiliary_Press_Release_Content {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Content) Limit(limit int) Auxiliary_Press_Release_Content {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Content) Offset(offset int) Auxiliary_Press_Release_Content {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_Content object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_Content) GetObject() (resp datatypes.Auxiliary_Press_Release_Content, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Content", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Media_Partner struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseMediaPartnerService returns an instance of the Auxiliary_Press_Release_Media_Partner SoftLayer service
|
||||
func GetAuxiliaryPressReleaseMediaPartnerService(sess *session.Session) Auxiliary_Press_Release_Media_Partner {
|
||||
return Auxiliary_Press_Release_Media_Partner{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner) Id(id int) Auxiliary_Press_Release_Media_Partner {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner) Mask(mask string) Auxiliary_Press_Release_Media_Partner {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner) Filter(filter string) Auxiliary_Press_Release_Media_Partner {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner) Limit(limit int) Auxiliary_Press_Release_Media_Partner {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner) Offset(offset int) Auxiliary_Press_Release_Media_Partner {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_Contact object whose contact id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_Media_Partner) GetObject() (resp datatypes.Auxiliary_Press_Release_Media_Partner, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Media_Partner", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Press_Release_Media_Partner_Press_Release struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryPressReleaseMediaPartnerPressReleaseService returns an instance of the Auxiliary_Press_Release_Media_Partner_Press_Release SoftLayer service
|
||||
func GetAuxiliaryPressReleaseMediaPartnerPressReleaseService(sess *session.Session) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
return Auxiliary_Press_Release_Media_Partner_Press_Release{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) Id(id int) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) Mask(mask string) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) Filter(filter string) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) Limit(limit int) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) Offset(offset int) Auxiliary_Press_Release_Media_Partner_Press_Release {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) GetMediaPartners() (resp []datatypes.Auxiliary_Press_Release_Media_Partner, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Media_Partner_Press_Release", "getMediaPartners", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Auxiliary_Press_Release_Media_Partner_Press_Release object whose media partner id number corresponds to the ID number of the init parameter passed to the SoftLayer_Auxiliary_Press_Release service.
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) GetObject() (resp datatypes.Auxiliary_Press_Release_Media_Partner_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Media_Partner_Press_Release", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Press_Release_Media_Partner_Press_Release) GetPressReleases() (resp []datatypes.Auxiliary_Press_Release, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release_Media_Partner_Press_Release", "getPressReleases", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Auxiliary_Shipping_Courier_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetAuxiliaryShippingCourierTypeService returns an instance of the Auxiliary_Shipping_Courier_Type SoftLayer service
|
||||
func GetAuxiliaryShippingCourierTypeService(sess *session.Session) Auxiliary_Shipping_Courier_Type {
|
||||
return Auxiliary_Shipping_Courier_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Auxiliary_Shipping_Courier_Type) Id(id int) Auxiliary_Shipping_Courier_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Shipping_Courier_Type) Mask(mask string) Auxiliary_Shipping_Courier_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Shipping_Courier_Type) Filter(filter string) Auxiliary_Shipping_Courier_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Shipping_Courier_Type) Limit(limit int) Auxiliary_Shipping_Courier_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Auxiliary_Shipping_Courier_Type) Offset(offset int) Auxiliary_Shipping_Courier_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Auxiliary_Shipping_Courier_Type) GetCourier() (resp []datatypes.Auxiliary_Shipping_Courier, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getCourier", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Auxiliary_Shipping_Courier_Type) GetObject() (resp datatypes.Auxiliary_Shipping_Courier_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Auxiliary_Shipping_Courier_Type) GetTypeByKeyName(keyName *string) (resp datatypes.Auxiliary_Shipping_Courier_Type, err error) {
|
||||
params := []interface{}{
|
||||
keyName,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Auxiliary_Shipping_Courier_Type", "getTypeByKeyName", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
2744
vendor/github.com/softlayer/softlayer-go/services/billing.go
generated
vendored
Normal file
2744
vendor/github.com/softlayer/softlayer-go/services/billing.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
293
vendor/github.com/softlayer/softlayer-go/services/brand.go
generated
vendored
Normal file
293
vendor/github.com/softlayer/softlayer-go/services/brand.go
generated
vendored
Normal file
|
@ -0,0 +1,293 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Brand data type contains brand information relating to the single SoftLayer customer account.
|
||||
//
|
||||
// SoftLayer customers are unable to change their brand information in the portal or the API.
|
||||
type Brand struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetBrandService returns an instance of the Brand SoftLayer service
|
||||
func GetBrandService(sess *session.Session) Brand {
|
||||
return Brand{Session: sess}
|
||||
}
|
||||
|
||||
func (r Brand) Id(id int) Brand {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand) Mask(mask string) Brand {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand) Filter(filter string) Brand {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand) Limit(limit int) Brand {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand) Offset(offset int) Brand {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Create a new customer account record.
|
||||
func (r Brand) CreateCustomerAccount(account *datatypes.Account, bypassDuplicateAccountCheck *bool) (resp datatypes.Account, err error) {
|
||||
params := []interface{}{
|
||||
account,
|
||||
bypassDuplicateAccountCheck,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "createCustomerAccount", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Create a new brand record.
|
||||
func (r Brand) CreateObject(templateObject *datatypes.Brand) (resp datatypes.Brand, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve All accounts owned by the brand.
|
||||
func (r Brand) GetAllOwnedAccounts() (resp []datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getAllOwnedAccounts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// (DEPRECATED) Use [[SoftLayer_Ticket_Subject::getAllObjects]] method.
|
||||
func (r Brand) GetAllTicketSubjects(account *datatypes.Account) (resp []datatypes.Ticket_Subject, err error) {
|
||||
params := []interface{}{
|
||||
account,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getAllTicketSubjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This flag indicates if creation of accounts is allowed.
|
||||
func (r Brand) GetAllowAccountCreationFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getAllowAccountCreationFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The Product Catalog for the Brand
|
||||
func (r Brand) GetCatalog() (resp datatypes.Product_Catalog, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getCatalog", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve the contact information for the brand such as the corporate or support contact. This will include the contact name, telephone number, fax number, email address, and mailing address of the contact.
|
||||
func (r Brand) GetContactInformation() (resp []datatypes.Brand_Contact, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getContactInformation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The contacts for the brand.
|
||||
func (r Brand) GetContacts() (resp []datatypes.Brand_Contact, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getContacts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
func (r Brand) GetCustomerCountryLocationRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getCustomerCountryLocationRestrictions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetDistributor() (resp datatypes.Brand, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getDistributor", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetDistributorChildFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getDistributorChildFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetDistributorFlag() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getDistributorFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve An account's associated hardware objects.
|
||||
func (r Brand) GetHardware() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetHasAgentSupportFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getHasAgentSupportFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Get the payment processor merchant name.
|
||||
func (r Brand) GetMerchantName() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getMerchantName", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Brand) GetObject() (resp datatypes.Brand, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetOpenTickets() (resp []datatypes.Ticket, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getOpenTickets", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Active accounts owned by the brand.
|
||||
func (r Brand) GetOwnedAccounts() (resp []datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getOwnedAccounts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetTicketGroups() (resp []datatypes.Ticket_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getTicketGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetTickets() (resp []datatypes.Ticket, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getTickets", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Brand) GetToken(userId *int) (resp string, err error) {
|
||||
params := []interface{}{
|
||||
userId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getToken", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Brand) GetUsers() (resp []datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getUsers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve An account's associated virtual guest objects.
|
||||
func (r Brand) GetVirtualGuests() (resp []datatypes.Virtual_Guest, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand", "getVirtualGuests", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The [[SoftLayer_Brand_Restriction_Location_CustomerCountry]] data type defines the relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on the SoftLayer US brand for customers that live in Great Britain.
|
||||
type Brand_Restriction_Location_CustomerCountry struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetBrandRestrictionLocationCustomerCountryService returns an instance of the Brand_Restriction_Location_CustomerCountry SoftLayer service
|
||||
func GetBrandRestrictionLocationCustomerCountryService(sess *session.Session) Brand_Restriction_Location_CustomerCountry {
|
||||
return Brand_Restriction_Location_CustomerCountry{Session: sess}
|
||||
}
|
||||
|
||||
func (r Brand_Restriction_Location_CustomerCountry) Id(id int) Brand_Restriction_Location_CustomerCountry {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand_Restriction_Location_CustomerCountry) Mask(mask string) Brand_Restriction_Location_CustomerCountry {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand_Restriction_Location_CustomerCountry) Filter(filter string) Brand_Restriction_Location_CustomerCountry {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand_Restriction_Location_CustomerCountry) Limit(limit int) Brand_Restriction_Location_CustomerCountry {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Brand_Restriction_Location_CustomerCountry) Offset(offset int) Brand_Restriction_Location_CustomerCountry {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Brand_Restriction_Location_CustomerCountry) GetAllObjects() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This references the brand that has a brand-location-country restriction setup.
|
||||
func (r Brand_Restriction_Location_CustomerCountry) GetBrand() (resp datatypes.Brand, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getBrand", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This references the datacenter that has a brand-location-country restriction setup. For example, if a datacenter is listed with a restriction for Canada, a Canadian customer may not be eligible to order services at that location.
|
||||
func (r Brand_Restriction_Location_CustomerCountry) GetLocation() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getLocation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Brand_Restriction_Location_CustomerCountry) GetObject() (resp datatypes.Brand_Restriction_Location_CustomerCountry, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Brand_Restriction_Location_CustomerCountry", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
207
vendor/github.com/softlayer/softlayer-go/services/catalyst.go
generated
vendored
Normal file
207
vendor/github.com/softlayer/softlayer-go/services/catalyst.go
generated
vendored
Normal file
|
@ -0,0 +1,207 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Company_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetCatalystCompanyTypeService returns an instance of the Catalyst_Company_Type SoftLayer service
|
||||
func GetCatalystCompanyTypeService(sess *session.Session) Catalyst_Company_Type {
|
||||
return Catalyst_Company_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Catalyst_Company_Type) Id(id int) Catalyst_Company_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Company_Type) Mask(mask string) Catalyst_Company_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Company_Type) Filter(filter string) Catalyst_Company_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Company_Type) Limit(limit int) Catalyst_Company_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Company_Type) Offset(offset int) Catalyst_Company_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// <<<EOT
|
||||
func (r Catalyst_Company_Type) GetAllObjects() (resp []datatypes.Catalyst_Company_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Company_Type) GetObject() (resp datatypes.Catalyst_Company_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Company_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Catalyst_Enrollment struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetCatalystEnrollmentService returns an instance of the Catalyst_Enrollment SoftLayer service
|
||||
func GetCatalystEnrollmentService(sess *session.Session) Catalyst_Enrollment {
|
||||
return Catalyst_Enrollment{Session: sess}
|
||||
}
|
||||
|
||||
func (r Catalyst_Enrollment) Id(id int) Catalyst_Enrollment {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Enrollment) Mask(mask string) Catalyst_Enrollment {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Enrollment) Filter(filter string) Catalyst_Enrollment {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Enrollment) Limit(limit int) Catalyst_Enrollment {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Catalyst_Enrollment) Offset(offset int) Catalyst_Enrollment {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Catalyst_Enrollment) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Catalyst_Enrollment) GetAffiliate() (resp datatypes.Catalyst_Affiliate, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetAffiliates() (resp []datatypes.Catalyst_Affiliate, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getAffiliates", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Catalyst_Enrollment) GetCompanyType() (resp datatypes.Catalyst_Company_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetCompanyTypes() (resp []datatypes.Catalyst_Company_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getCompanyTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetEnrollmentRequestAnnualRevenueOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestAnnualRevenueOptions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetEnrollmentRequestUserCountOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestUserCountOptions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetEnrollmentRequestYearsInOperationOptions() (resp []datatypes.Catalyst_Enrollment_Request_Container_AnswerOption, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getEnrollmentRequestYearsInOperationOptions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Catalyst_Enrollment) GetIsActiveFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getIsActiveFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) GetObject() (resp datatypes.Catalyst_Enrollment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Catalyst_Enrollment) GetRepresentative() (resp datatypes.User_Employee, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "getRepresentative", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) RequestManualEnrollment(request *datatypes.Container_Catalyst_ManualEnrollmentRequest) (err error) {
|
||||
var resp datatypes.Void
|
||||
params := []interface{}{
|
||||
request,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "requestManualEnrollment", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Catalyst_Enrollment) RequestSelfEnrollment(enrollmentRequest *datatypes.Catalyst_Enrollment_Request) (resp datatypes.Account, err error) {
|
||||
params := []interface{}{
|
||||
enrollmentRequest,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Catalyst_Enrollment", "requestSelfEnrollment", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
82
vendor/github.com/softlayer/softlayer-go/services/compliance.go
generated
vendored
Normal file
82
vendor/github.com/softlayer/softlayer-go/services/compliance.go
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Compliance_Report_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetComplianceReportTypeService returns an instance of the Compliance_Report_Type SoftLayer service
|
||||
func GetComplianceReportTypeService(sess *session.Session) Compliance_Report_Type {
|
||||
return Compliance_Report_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Compliance_Report_Type) Id(id int) Compliance_Report_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Compliance_Report_Type) Mask(mask string) Compliance_Report_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Compliance_Report_Type) Filter(filter string) Compliance_Report_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Compliance_Report_Type) Limit(limit int) Compliance_Report_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Compliance_Report_Type) Offset(offset int) Compliance_Report_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Compliance_Report_Type) GetAllObjects() (resp []datatypes.Compliance_Report_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Compliance_Report_Type) GetObject() (resp datatypes.Compliance_Report_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
799
vendor/github.com/softlayer/softlayer-go/services/configuration.go
generated
vendored
Normal file
799
vendor/github.com/softlayer/softlayer-go/services/configuration.go
generated
vendored
Normal file
|
@ -0,0 +1,799 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Supported hardware raid modes
|
||||
type Configuration_Storage_Group_Array_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationStorageGroupArrayTypeService returns an instance of the Configuration_Storage_Group_Array_Type SoftLayer service
|
||||
func GetConfigurationStorageGroupArrayTypeService(sess *session.Session) Configuration_Storage_Group_Array_Type {
|
||||
return Configuration_Storage_Group_Array_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Storage_Group_Array_Type) Id(id int) Configuration_Storage_Group_Array_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Storage_Group_Array_Type) Mask(mask string) Configuration_Storage_Group_Array_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Storage_Group_Array_Type) Filter(filter string) Configuration_Storage_Group_Array_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Storage_Group_Array_Type) Limit(limit int) Configuration_Storage_Group_Array_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Storage_Group_Array_Type) Offset(offset int) Configuration_Storage_Group_Array_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Storage_Group_Array_Type) GetAllObjects() (resp []datatypes.Configuration_Storage_Group_Array_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Storage_Group_Array_Type) GetHardwareComponentModels() (resp []datatypes.Hardware_Component_Model, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getHardwareComponentModels", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Storage_Group_Array_Type) GetObject() (resp datatypes.Configuration_Storage_Group_Array_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Storage_Group_Array_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template data type contains general information of an arbitrary resource.
|
||||
type Configuration_Template struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateService returns an instance of the Configuration_Template SoftLayer service
|
||||
func GetConfigurationTemplateService(sess *session.Session) Configuration_Template {
|
||||
return Configuration_Template{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template) Id(id int) Configuration_Template {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template) Mask(mask string) Configuration_Template {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template) Filter(filter string) Configuration_Template {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template) Limit(limit int) Configuration_Template {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template) Offset(offset int) Configuration_Template {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Copy a configuration template and returns a newly created template copy
|
||||
func (r Configuration_Template) CopyTemplate(templateObject *datatypes.Configuration_Template) (resp datatypes.Configuration_Template, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "copyTemplate", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Deletes a customer configuration template.
|
||||
func (r Configuration_Template) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit the object by passing in a modified instance of the object. Use this method to modify configuration template name or description.
|
||||
func (r Configuration_Template) EditObject(templateObject *datatypes.Configuration_Template) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieves all available configuration templates
|
||||
func (r Configuration_Template) GetAllObjects() (resp []datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetConfigurationSections() (resp []datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationSections", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetConfigurationTemplateReference() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getConfigurationTemplateReference", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetDefaultValues() (resp []datatypes.Configuration_Template_Section_Definition_Value, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefaultValues", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetDefinitions() (resp []datatypes.Configuration_Template_Section_Definition, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getDefinitions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetItem() (resp datatypes.Product_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetLinkedSectionReferences() (resp datatypes.Configuration_Template_Section_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getLinkedSectionReferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template) GetObject() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetParent() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getParent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template) GetUser() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "getUser", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Updates default configuration values.
|
||||
func (r Configuration_Template) UpdateDefaultValues(configurationValues []datatypes.Configuration_Template_Section_Definition_Value) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
configurationValues,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template", "updateDefaultValues", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section data type contains information of a configuration section.
|
||||
//
|
||||
// Configuration can contain sub-sections.
|
||||
type Configuration_Template_Section struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionService returns an instance of the Configuration_Template_Section SoftLayer service
|
||||
func GetConfigurationTemplateSectionService(sess *session.Session) Configuration_Template_Section {
|
||||
return Configuration_Template_Section{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section) Id(id int) Configuration_Template_Section {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section) Mask(mask string) Configuration_Template_Section {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section) Filter(filter string) Configuration_Template_Section {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section) Limit(limit int) Configuration_Template_Section {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section) Offset(offset int) Configuration_Template_Section {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetDefinitions() (resp []datatypes.Configuration_Template_Section_Definition, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDefinitions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetDisallowedDeletionFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getDisallowedDeletionFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetLinkedTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getLinkedTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetLinkedTemplateReference() (resp datatypes.Configuration_Template_Section_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getLinkedTemplateReference", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section) GetObject() (resp datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetProfiles() (resp []datatypes.Configuration_Template_Section_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getProfiles", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetSectionType() (resp datatypes.Configuration_Template_Section_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSectionType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetSectionTypeName() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSectionTypeName", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetSubSections() (resp []datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getSubSections", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section) GetTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "getTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns true if the object has sub-sections
|
||||
func (r Configuration_Template_Section) HasSubSections() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section", "hasSubSections", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Configuration definition gives you details of the value that you're setting.
|
||||
//
|
||||
// Some monitoring agents requires values unique to your system. If value type is defined as "Resource Specific Values", you will have to make an additional API call to retrieve your system specific values.
|
||||
//
|
||||
// See [[SoftLayer_Monitoring_Agent::getAvailableConfigurationValues|Monitoring Agent]] service to retrieve your system specific values.
|
||||
type Configuration_Template_Section_Definition struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionDefinitionService returns an instance of the Configuration_Template_Section_Definition SoftLayer service
|
||||
func GetConfigurationTemplateSectionDefinitionService(sess *session.Session) Configuration_Template_Section_Definition {
|
||||
return Configuration_Template_Section_Definition{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition) Id(id int) Configuration_Template_Section_Definition {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition) Mask(mask string) Configuration_Template_Section_Definition {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition) Filter(filter string) Configuration_Template_Section_Definition {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition) Limit(limit int) Configuration_Template_Section_Definition {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition) Offset(offset int) Configuration_Template_Section_Definition {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetAttributes() (resp []datatypes.Configuration_Template_Section_Definition_Attribute, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getAttributes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetDefaultValue() (resp datatypes.Configuration_Template_Section_Definition_Value, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getDefaultValue", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetGroup() (resp datatypes.Configuration_Template_Section_Definition_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetMonitoringDataFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getMonitoringDataFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Definition) GetObject() (resp datatypes.Configuration_Template_Section_Definition, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetSection() (resp datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getSection", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition) GetValueType() (resp datatypes.Configuration_Template_Section_Definition_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition", "getValueType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Configuration definition group gives you details of the definition and allows extra functionality.
|
||||
//
|
||||
//
|
||||
type Configuration_Template_Section_Definition_Group struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionDefinitionGroupService returns an instance of the Configuration_Template_Section_Definition_Group SoftLayer service
|
||||
func GetConfigurationTemplateSectionDefinitionGroupService(sess *session.Session) Configuration_Template_Section_Definition_Group {
|
||||
return Configuration_Template_Section_Definition_Group{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Group) Id(id int) Configuration_Template_Section_Definition_Group {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Group) Mask(mask string) Configuration_Template_Section_Definition_Group {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Group) Filter(filter string) Configuration_Template_Section_Definition_Group {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Group) Limit(limit int) Configuration_Template_Section_Definition_Group {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Group) Offset(offset int) Configuration_Template_Section_Definition_Group {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Get all configuration definition group objects.
|
||||
//
|
||||
// ''getAllGroups'' returns an array of SoftLayer_Configuration_Template_Section_Definition_Group objects upon success.
|
||||
func (r Configuration_Template_Section_Definition_Group) GetAllGroups() (resp []datatypes.Configuration_Template_Section_Definition_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Definition_Group) GetObject() (resp datatypes.Configuration_Template_Section_Definition_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition_Group) GetParent() (resp datatypes.Configuration_Template_Section_Definition_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getParent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Configuration_Template_Section_Definition_Type further defines the value of a configuration definition.
|
||||
type Configuration_Template_Section_Definition_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionDefinitionTypeService returns an instance of the Configuration_Template_Section_Definition_Type SoftLayer service
|
||||
func GetConfigurationTemplateSectionDefinitionTypeService(sess *session.Session) Configuration_Template_Section_Definition_Type {
|
||||
return Configuration_Template_Section_Definition_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Type) Id(id int) Configuration_Template_Section_Definition_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Type) Mask(mask string) Configuration_Template_Section_Definition_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Type) Filter(filter string) Configuration_Template_Section_Definition_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Type) Limit(limit int) Configuration_Template_Section_Definition_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Type) Offset(offset int) Configuration_Template_Section_Definition_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Definition_Type) GetObject() (resp datatypes.Configuration_Template_Section_Definition_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Configuration_Section_Value is used to set the value for a configuration definition
|
||||
type Configuration_Template_Section_Definition_Value struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionDefinitionValueService returns an instance of the Configuration_Template_Section_Definition_Value SoftLayer service
|
||||
func GetConfigurationTemplateSectionDefinitionValueService(sess *session.Session) Configuration_Template_Section_Definition_Value {
|
||||
return Configuration_Template_Section_Definition_Value{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Value) Id(id int) Configuration_Template_Section_Definition_Value {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Value) Mask(mask string) Configuration_Template_Section_Definition_Value {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Value) Filter(filter string) Configuration_Template_Section_Definition_Value {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Value) Limit(limit int) Configuration_Template_Section_Definition_Value {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Definition_Value) Offset(offset int) Configuration_Template_Section_Definition_Value {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition_Value) GetDefinition() (resp datatypes.Configuration_Template_Section_Definition, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Value", "getDefinition", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Definition_Value) GetObject() (resp datatypes.Configuration_Template_Section_Definition_Value, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Value", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Definition_Value) GetTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Value", "getTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Some configuration templates let you create a unique configuration profiles.
|
||||
//
|
||||
// For example, you can create multiple configuration profiles to monitor multiple hard drives with "CPU/Memory/Disk Monitoring Agent". SoftLayer_Configuration_Template_Section_Profile help you keep track of custom configuration profiles.
|
||||
type Configuration_Template_Section_Profile struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionProfileService returns an instance of the Configuration_Template_Section_Profile SoftLayer service
|
||||
func GetConfigurationTemplateSectionProfileService(sess *session.Session) Configuration_Template_Section_Profile {
|
||||
return Configuration_Template_Section_Profile{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Profile) Id(id int) Configuration_Template_Section_Profile {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Profile) Mask(mask string) Configuration_Template_Section_Profile {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Profile) Filter(filter string) Configuration_Template_Section_Profile {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Profile) Limit(limit int) Configuration_Template_Section_Profile {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Profile) Offset(offset int) Configuration_Template_Section_Profile {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Profile) GetConfigurationSection() (resp datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Profile", "getConfigurationSection", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Profile) GetMonitoringAgent() (resp datatypes.Monitoring_Agent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Profile", "getMonitoringAgent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Profile) GetObject() (resp datatypes.Configuration_Template_Section_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Profile", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section_Reference data type contains information of a configuration section and its associated configuration template.
|
||||
type Configuration_Template_Section_Reference struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionReferenceService returns an instance of the Configuration_Template_Section_Reference SoftLayer service
|
||||
func GetConfigurationTemplateSectionReferenceService(sess *session.Session) Configuration_Template_Section_Reference {
|
||||
return Configuration_Template_Section_Reference{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Reference) Id(id int) Configuration_Template_Section_Reference {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Reference) Mask(mask string) Configuration_Template_Section_Reference {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Reference) Filter(filter string) Configuration_Template_Section_Reference {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Reference) Limit(limit int) Configuration_Template_Section_Reference {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Reference) Offset(offset int) Configuration_Template_Section_Reference {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Reference) GetObject() (resp datatypes.Configuration_Template_Section_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Reference", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Reference) GetSection() (resp datatypes.Configuration_Template_Section, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Reference", "getSection", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Configuration_Template_Section_Reference) GetTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Reference", "getTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Section_Type data type contains information of a configuration section type.
|
||||
//
|
||||
// Configuration can contain sub-sections.
|
||||
type Configuration_Template_Section_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateSectionTypeService returns an instance of the Configuration_Template_Section_Type SoftLayer service
|
||||
func GetConfigurationTemplateSectionTypeService(sess *session.Session) Configuration_Template_Section_Type {
|
||||
return Configuration_Template_Section_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Type) Id(id int) Configuration_Template_Section_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Type) Mask(mask string) Configuration_Template_Section_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Type) Filter(filter string) Configuration_Template_Section_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Type) Limit(limit int) Configuration_Template_Section_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Section_Type) Offset(offset int) Configuration_Template_Section_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Section_Type) GetObject() (resp datatypes.Configuration_Template_Section_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Configuration_Template_Type data type contains configuration template type information.
|
||||
type Configuration_Template_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetConfigurationTemplateTypeService returns an instance of the Configuration_Template_Type SoftLayer service
|
||||
func GetConfigurationTemplateTypeService(sess *session.Session) Configuration_Template_Type {
|
||||
return Configuration_Template_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Type) Id(id int) Configuration_Template_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Type) Mask(mask string) Configuration_Template_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Type) Filter(filter string) Configuration_Template_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Type) Limit(limit int) Configuration_Template_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Configuration_Template_Type) Offset(offset int) Configuration_Template_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Configuration_Template_Type) GetObject() (resp datatypes.Configuration_Template_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Configuration_Template_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
1094
vendor/github.com/softlayer/softlayer-go/services/dns.go
generated
vendored
Normal file
1094
vendor/github.com/softlayer/softlayer-go/services/dns.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
103
vendor/github.com/softlayer/softlayer-go/services/event.go
generated
vendored
Normal file
103
vendor/github.com/softlayer/softlayer-go/services/event.go
generated
vendored
Normal file
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Event_Log data type contains an event detail occurred upon various SoftLayer resources.
|
||||
type Event_Log struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetEventLogService returns an instance of the Event_Log SoftLayer service
|
||||
func GetEventLogService(sess *session.Session) Event_Log {
|
||||
return Event_Log{Session: sess}
|
||||
}
|
||||
|
||||
func (r Event_Log) Id(id int) Event_Log {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Event_Log) Mask(mask string) Event_Log {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Event_Log) Filter(filter string) Event_Log {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Event_Log) Limit(limit int) Event_Log {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Event_Log) Offset(offset int) Event_Log {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This all indexed event names.
|
||||
func (r Event_Log) GetAllEventNames(objectName *string) (resp []string, err error) {
|
||||
params := []interface{}{
|
||||
objectName,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This all indexed event object names.
|
||||
func (r Event_Log) GetAllEventObjectNames() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventObjectNames", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Event_Log) GetAllObjects() (resp []datatypes.Event_Log, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Event_Log) GetAllUserTypes() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllUserTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Event_Log) GetUser() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Event_Log", "getUser", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
100
vendor/github.com/softlayer/softlayer-go/services/flexiblecredit.go
generated
vendored
Normal file
100
vendor/github.com/softlayer/softlayer-go/services/flexiblecredit.go
generated
vendored
Normal file
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type FlexibleCredit_Program struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetFlexibleCreditProgramService returns an instance of the FlexibleCredit_Program SoftLayer service
|
||||
func GetFlexibleCreditProgramService(sess *session.Session) FlexibleCredit_Program {
|
||||
return FlexibleCredit_Program{Session: sess}
|
||||
}
|
||||
|
||||
func (r FlexibleCredit_Program) Id(id int) FlexibleCredit_Program {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r FlexibleCredit_Program) Mask(mask string) FlexibleCredit_Program {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r FlexibleCredit_Program) Filter(filter string) FlexibleCredit_Program {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r FlexibleCredit_Program) Limit(limit int) FlexibleCredit_Program {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r FlexibleCredit_Program) Offset(offset int) FlexibleCredit_Program {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerificationType(verificationTypeKeyName *string) (resp []datatypes.FlexibleCredit_Affiliate, err error) {
|
||||
params := []interface{}{
|
||||
verificationTypeKeyName,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r FlexibleCredit_Program) GetCompanyTypes() (resp []datatypes.FlexibleCredit_Company_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r FlexibleCredit_Program) GetObject() (resp datatypes.FlexibleCredit_Program, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r FlexibleCredit_Program) SelfEnrollNewAccount(accountTemplate *datatypes.Account) (resp datatypes.Account, err error) {
|
||||
params := []interface{}{
|
||||
accountTemplate,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "selfEnrollNewAccount", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
7779
vendor/github.com/softlayer/softlayer-go/services/hardware.go
generated
vendored
Normal file
7779
vendor/github.com/softlayer/softlayer-go/services/hardware.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
512
vendor/github.com/softlayer/softlayer-go/services/layout.go
generated
vendored
Normal file
512
vendor/github.com/softlayer/softlayer-go/services/layout.go
generated
vendored
Normal file
|
@ -0,0 +1,512 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Layout_Container contains definitions for default page layouts
|
||||
type Layout_Container struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutContainerService returns an instance of the Layout_Container SoftLayer service
|
||||
func GetLayoutContainerService(sess *session.Session) Layout_Container {
|
||||
return Layout_Container{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Container) Id(id int) Layout_Container {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Container) Mask(mask string) Layout_Container {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Container) Filter(filter string) Layout_Container {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Container) Limit(limit int) Layout_Container {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Container) Offset(offset int) Layout_Container {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use this method to retrieve all active layout containers that can be customized.
|
||||
func (r Layout_Container) GetAllObjects() (resp []datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Container", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type of the layout container object
|
||||
func (r Layout_Container) GetLayoutContainerType() (resp datatypes.Layout_Container_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutContainerType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The layout items assigned to this layout container
|
||||
func (r Layout_Container) GetLayoutItems() (resp []datatypes.Layout_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Container", "getLayoutItems", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Container) GetObject() (resp datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Container", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Item contains definitions for default layout items
|
||||
type Layout_Item struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutItemService returns an instance of the Layout_Item SoftLayer service
|
||||
func GetLayoutItemService(sess *session.Session) Layout_Item {
|
||||
return Layout_Item{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Item) Id(id int) Layout_Item {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Item) Mask(mask string) Layout_Item {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Item) Filter(filter string) Layout_Item {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Item) Limit(limit int) Layout_Item {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Item) Offset(offset int) Layout_Item {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The layout preferences assigned to this layout item
|
||||
func (r Layout_Item) GetLayoutItemPreferences() (resp []datatypes.Layout_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type of the layout item object
|
||||
func (r Layout_Item) GetLayoutItemType() (resp datatypes.Layout_Item_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Item", "getLayoutItemType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Item) GetObject() (resp datatypes.Layout_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Item", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Profile contains the definition of the layout profile
|
||||
type Layout_Profile struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutProfileService returns an instance of the Layout_Profile SoftLayer service
|
||||
func GetLayoutProfileService(sess *session.Session) Layout_Profile {
|
||||
return Layout_Profile{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Profile) Id(id int) Layout_Profile {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile) Mask(mask string) Layout_Profile {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile) Filter(filter string) Layout_Profile {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile) Limit(limit int) Layout_Profile {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile) Offset(offset int) Layout_Profile {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method creates a new layout profile object.
|
||||
func (r Layout_Profile) CreateObject(templateObject *datatypes.Layout_Profile) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method deletes an existing layout profile and associated custom preferences
|
||||
func (r Layout_Profile) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method edits an existing layout profile object by passing in a modified instance of the object.
|
||||
func (r Layout_Profile) EditObject(templateObject *datatypes.Layout_Profile) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile) GetLayoutContainers() (resp []datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutContainers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getLayoutPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile) GetObject() (resp datatypes.Layout_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method modifies an existing associated [[SoftLayer_Layout_Profile_Preference]] object. If the preference object being modified is a default value object, a new record is created to override the default value.
|
||||
//
|
||||
// Only preferences that are assigned to a profile may be updated. Attempts to update a non-existent preference object will result in an exception being thrown.
|
||||
func (r Layout_Profile) ModifyPreference(templateObject *datatypes.Layout_Profile_Preference) (resp datatypes.Layout_Profile_Preference, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreference", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Using this method, multiple [[SoftLayer_Layout_Profile_Preference]] objects may be updated at once.
|
||||
//
|
||||
// Refer to [[SoftLayer_Layout_Profile::modifyPreference()]] for more information.
|
||||
func (r Layout_Profile) ModifyPreferences(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) {
|
||||
params := []interface{}{
|
||||
layoutPreferenceObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile", "modifyPreferences", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Layout_Profile_Containers struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutProfileContainersService returns an instance of the Layout_Profile_Containers SoftLayer service
|
||||
func GetLayoutProfileContainersService(sess *session.Session) Layout_Profile_Containers {
|
||||
return Layout_Profile_Containers{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Containers) Id(id int) Layout_Profile_Containers {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Containers) Mask(mask string) Layout_Profile_Containers {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Containers) Filter(filter string) Layout_Profile_Containers {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Containers) Limit(limit int) Layout_Profile_Containers {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Containers) Offset(offset int) Layout_Profile_Containers {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile_Containers) CreateObject(templateObject *datatypes.Layout_Profile_Containers) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Containers", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile_Containers) EditObject(templateObject *datatypes.Layout_Profile_Containers) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Containers", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The container to be contained
|
||||
func (r Layout_Profile_Containers) GetLayoutContainerType() (resp datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Containers", "getLayoutContainerType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The profile containing this container
|
||||
func (r Layout_Profile_Containers) GetLayoutProfile() (resp datatypes.Layout_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Containers", "getLayoutProfile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile_Containers) GetObject() (resp datatypes.Layout_Profile_Containers, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Containers", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Layout_Profile_Customer struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutProfileCustomerService returns an instance of the Layout_Profile_Customer SoftLayer service
|
||||
func GetLayoutProfileCustomerService(sess *session.Session) Layout_Profile_Customer {
|
||||
return Layout_Profile_Customer{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Customer) Id(id int) Layout_Profile_Customer {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Customer) Mask(mask string) Layout_Profile_Customer {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Customer) Filter(filter string) Layout_Profile_Customer {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Customer) Limit(limit int) Layout_Profile_Customer {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Customer) Offset(offset int) Layout_Profile_Customer {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method creates a new layout profile object.
|
||||
func (r Layout_Profile_Customer) CreateObject(templateObject *datatypes.Layout_Profile) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method deletes an existing layout profile and associated custom preferences
|
||||
func (r Layout_Profile_Customer) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method edits an existing layout profile object by passing in a modified instance of the object.
|
||||
func (r Layout_Profile_Customer) EditObject(templateObject *datatypes.Layout_Profile) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Customer) GetLayoutContainers() (resp []datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutContainers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Customer) GetLayoutPreferences() (resp []datatypes.Layout_Profile_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getLayoutPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile_Customer) GetObject() (resp datatypes.Layout_Profile_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Customer) GetUserRecord() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "getUserRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method modifies an existing associated [[SoftLayer_Layout_Profile_Preference]] object. If the preference object being modified is a default value object, a new record is created to override the default value.
|
||||
//
|
||||
// Only preferences that are assigned to a profile may be updated. Attempts to update a non-existent preference object will result in an exception being thrown.
|
||||
func (r Layout_Profile_Customer) ModifyPreference(templateObject *datatypes.Layout_Profile_Preference) (resp datatypes.Layout_Profile_Preference, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreference", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Using this method, multiple [[SoftLayer_Layout_Profile_Preference]] objects may be updated at once.
|
||||
//
|
||||
// Refer to [[SoftLayer_Layout_Profile::modifyPreference()]] for more information.
|
||||
func (r Layout_Profile_Customer) ModifyPreferences(layoutPreferenceObjects []datatypes.Layout_Profile_Preference) (resp []datatypes.Layout_Profile_Preference, err error) {
|
||||
params := []interface{}{
|
||||
layoutPreferenceObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Customer", "modifyPreferences", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Layout_Profile_Preference contains definitions for layout preferences
|
||||
type Layout_Profile_Preference struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLayoutProfilePreferenceService returns an instance of the Layout_Profile_Preference SoftLayer service
|
||||
func GetLayoutProfilePreferenceService(sess *session.Session) Layout_Profile_Preference {
|
||||
return Layout_Profile_Preference{Session: sess}
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Preference) Id(id int) Layout_Profile_Preference {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Preference) Mask(mask string) Layout_Profile_Preference {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Preference) Filter(filter string) Layout_Profile_Preference {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Preference) Limit(limit int) Layout_Profile_Preference {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Layout_Profile_Preference) Offset(offset int) Layout_Profile_Preference {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Preference) GetLayoutContainer() (resp datatypes.Layout_Container, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Preference", "getLayoutContainer", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Preference) GetLayoutItem() (resp datatypes.Layout_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Preference", "getLayoutItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Preference) GetLayoutPreference() (resp datatypes.Layout_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Preference", "getLayoutPreference", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Layout_Profile_Preference) GetLayoutProfile() (resp datatypes.Layout_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Preference", "getLayoutProfile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Layout_Profile_Preference) GetObject() (resp datatypes.Layout_Profile_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Layout_Profile_Preference", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
201
vendor/github.com/softlayer/softlayer-go/services/locale.go
generated
vendored
Normal file
201
vendor/github.com/softlayer/softlayer-go/services/locale.go
generated
vendored
Normal file
|
@ -0,0 +1,201 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Locale struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocaleService returns an instance of the Locale SoftLayer service
|
||||
func GetLocaleService(sess *session.Session) Locale {
|
||||
return Locale{Session: sess}
|
||||
}
|
||||
|
||||
func (r Locale) Id(id int) Locale {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale) Mask(mask string) Locale {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale) Filter(filter string) Locale {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale) Limit(limit int) Locale {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale) Offset(offset int) Locale {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Locale) GetClosestToLanguageTag(languageTag *string) (resp datatypes.Locale, err error) {
|
||||
params := []interface{}{
|
||||
languageTag,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Locale", "getClosestToLanguageTag", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Locale) GetObject() (resp datatypes.Locale, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Locale_Country struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocaleCountryService returns an instance of the Locale_Country SoftLayer service
|
||||
func GetLocaleCountryService(sess *session.Session) Locale_Country {
|
||||
return Locale_Country{Session: sess}
|
||||
}
|
||||
|
||||
func (r Locale_Country) Id(id int) Locale_Country {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Country) Mask(mask string) Locale_Country {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Country) Filter(filter string) Locale_Country {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Country) Limit(limit int) Locale_Country {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Country) Offset(offset int) Locale_Country {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use this method to retrieve a list of countries and locale information available to the current user.
|
||||
func (r Locale_Country) GetAvailableCountries() (resp []datatypes.Locale_Country, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Country", "getAvailableCountries", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Use this method to retrieve a list of countries and locale information such as country code and state/provinces.
|
||||
func (r Locale_Country) GetCountries() (resp []datatypes.Locale_Country, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Country", "getCountries", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Locale_Country) GetObject() (resp datatypes.Locale_Country, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Country", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve States that belong to this country.
|
||||
func (r Locale_Country) GetStates() (resp []datatypes.Locale_StateProvince, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Country", "getStates", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Each User is assigned a timezone allowing for a precise local timestamp.
|
||||
type Locale_Timezone struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocaleTimezoneService returns an instance of the Locale_Timezone SoftLayer service
|
||||
func GetLocaleTimezoneService(sess *session.Session) Locale_Timezone {
|
||||
return Locale_Timezone{Session: sess}
|
||||
}
|
||||
|
||||
func (r Locale_Timezone) Id(id int) Locale_Timezone {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Timezone) Mask(mask string) Locale_Timezone {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Timezone) Filter(filter string) Locale_Timezone {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Timezone) Limit(limit int) Locale_Timezone {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Locale_Timezone) Offset(offset int) Locale_Timezone {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve all timezone objects.
|
||||
func (r Locale_Timezone) GetAllObjects() (resp []datatypes.Locale_Timezone, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Locale_Timezone object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Locale_Timezone service.
|
||||
func (r Locale_Timezone) GetObject() (resp datatypes.Locale_Timezone, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Locale_Timezone", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
866
vendor/github.com/softlayer/softlayer-go/services/location.go
generated
vendored
Normal file
866
vendor/github.com/softlayer/softlayer-go/services/location.go
generated
vendored
Normal file
|
@ -0,0 +1,866 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Every piece of hardware and network connection owned by SoftLayer is tracked physically by location and stored in the SoftLayer_Location data type. SoftLayer locations exist in parent/child relationships, a convenient way to track equipment from it's city, datacenter, server room, rack, then slot. Network backbones are tied to datacenters only, not to a room, rack, or slot.
|
||||
type Location struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationService returns an instance of the Location SoftLayer service
|
||||
func GetLocationService(sess *session.Session) Location {
|
||||
return Location{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location) Id(id int) Location {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location) Mask(mask string) Location {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location) Filter(filter string) Location {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location) Limit(limit int) Location {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location) Offset(offset int) Location {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available.
|
||||
func (r Location) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getBackboneDependents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
|
||||
func (r Location) GetDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs.
|
||||
func (r Location) GetGroups() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getHardwareFirewalls", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location's physical address.
|
||||
func (r Location) GetLocationAddress() (resp datatypes.Account_Address, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getLocationAddress", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location's Dedicated Rack member
|
||||
func (r Location) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getLocationReservationMember", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The current locations status.
|
||||
func (r Location) GetLocationStatus() (resp datatypes.Location_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getLocationStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location) GetNetworkConfigurationAttribute() (resp datatypes.Hardware_Attribute, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getNetworkConfigurationAttribute", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location) GetObject() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The total number of users online using SoftLayer's PPTP VPN service for a location.
|
||||
func (r Location) GetOnlinePptpVpnUserCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getOnlinePptpVpnUserCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The total number of users online using SoftLayer's SSL VPN service for a location.
|
||||
func (r Location) GetOnlineSslVpnUserCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getOnlineSslVpnUserCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location) GetPathString() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getPathString", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
|
||||
func (r Location) GetPriceGroups() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getPriceGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs.
|
||||
func (r Location) GetRegions() (resp []datatypes.Location_Region, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getRegions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location) GetTimezone() (resp datatypes.Locale_Timezone, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getTimezone", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 Bandwidth Pooling Group. This will show which group to which a location belongs.
|
||||
func (r Location) GetVdrGroup() (resp datatypes.Location_Group_Location_CrossReference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getVdrGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
|
||||
func (r Location) GetViewableDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getViewableDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all viewable pop and datacenter locations.
|
||||
func (r Location) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getViewablePopsAndDataCenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all viewable network locations.
|
||||
func (r Location) GetViewablepointOfPresence() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getViewablepointOfPresence", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all point of presence locations.
|
||||
func (r Location) GetpointOfPresence() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location", "getpointOfPresence", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Location_Datacenter extends the [[SoftLayer_Location]] data type to include datacenter-specific properties.
|
||||
type Location_Datacenter struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationDatacenterService returns an instance of the Location_Datacenter SoftLayer service
|
||||
func GetLocationDatacenterService(sess *session.Session) Location_Datacenter {
|
||||
return Location_Datacenter{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Datacenter) Id(id int) Location_Datacenter {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Datacenter) Mask(mask string) Location_Datacenter {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Datacenter) Filter(filter string) Location_Datacenter {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Datacenter) Limit(limit int) Location_Datacenter {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Datacenter) Offset(offset int) Location_Datacenter {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetActiveItemPresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActiveItemPresaleEvents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetActivePresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getActivePresaleEvents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Object Storage is only available in select datacenters. This method will return all the datacenters where object storage is available.
|
||||
func (r Location_Datacenter) GetAvailableObjectStorageDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getAvailableObjectStorageDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetBackboneDependents() (resp []datatypes.Network_Backbone_Location_Dependent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackboneDependents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetBackendHardwareRouters() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBackendHardwareRouters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Subnets which are directly bound to one or more routers in a given datacenter, and currently allow routing.
|
||||
func (r Location_Datacenter) GetBoundSubnets() (resp []datatypes.Network_Subnet, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBoundSubnets", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This references relationship between brands, locations and countries associated with a user's account that are ineligible when ordering products. For example, the India datacenter may not be available on this brand for customers that live in Great Britain.
|
||||
func (r Location_Datacenter) GetBrandCountryRestrictions() (resp []datatypes.Brand_Restriction_Location_CustomerCountry, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getBrandCountryRestrictions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
|
||||
func (r Location_Datacenter) GetDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Datacenter) GetDatacentersWithVirtualImageStoreServiceResourceRecord() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getDatacentersWithVirtualImageStoreServiceResourceRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetFrontendHardwareRouters() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getFrontendHardwareRouters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more groups. This will show which groups to which a location belongs.
|
||||
func (r Location_Datacenter) GetGroups() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetHardwareFirewalls() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareFirewalls", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetHardwareRouters() (resp []datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getHardwareRouters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location's physical address.
|
||||
func (r Location_Datacenter) GetLocationAddress() (resp datatypes.Account_Address, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationAddress", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location's Dedicated Rack member
|
||||
func (r Location_Datacenter) GetLocationReservationMember() (resp datatypes.Location_Reservation_Rack_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationReservationMember", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The current locations status.
|
||||
func (r Location_Datacenter) GetLocationStatus() (resp datatypes.Location_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getLocationStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetNetworkConfigurationAttribute() (resp datatypes.Hardware_Attribute, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getNetworkConfigurationAttribute", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Datacenter) GetObject() (resp datatypes.Location_Datacenter, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The total number of users online using SoftLayer's PPTP VPN service for a location.
|
||||
func (r Location_Datacenter) GetOnlinePptpVpnUserCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getOnlinePptpVpnUserCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The total number of users online using SoftLayer's SSL VPN service for a location.
|
||||
func (r Location_Datacenter) GetOnlineSslVpnUserCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getOnlineSslVpnUserCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetPathString() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPathString", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetPresaleEvents() (resp []datatypes.Sales_Presale_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPresaleEvents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more Price Groups. This will show which groups to which a location belongs.
|
||||
func (r Location_Datacenter) GetPriceGroups() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getPriceGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The regional group this datacenter belongs to.
|
||||
func (r Location_Datacenter) GetRegionalGroup() (resp datatypes.Location_Group_Regional, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetRegionalInternetRegistry() (resp datatypes.Network_Regional_Internet_Registry, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegionalInternetRegistry", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 or more regions. This will show which regions to which a location belongs.
|
||||
func (r Location_Datacenter) GetRegions() (resp []datatypes.Location_Region, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRegions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Retrieve all subnets that are eligible to be routed; those which the account has permission to associate with a vlan.
|
||||
func (r Location_Datacenter) GetRoutableBoundSubnets() (resp []datatypes.Network_Subnet, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getRoutableBoundSubnets", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a graph of a SoftLayer datacenter's last 48 hours of network activity. Statistics graphs show traffic outbound from a datacenter on top and inbound traffic on the bottom followed by a legend of the network services tracked in the graph. getStatisticsGraphImage returns a PNG image of variable width and height depending on the number of services reported in the image.
|
||||
func (r Location_Datacenter) GetStatisticsGraphImage() (resp []byte, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getStatisticsGraphImage", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Datacenter) GetTimezone() (resp datatypes.Locale_Timezone, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getTimezone", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A location can be a member of 1 Bandwidth Pooling Group. This will show which group to which a location belongs.
|
||||
func (r Location_Datacenter) GetVdrGroup() (resp datatypes.Location_Group_Location_CrossReference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getVdrGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all datacenter locations. SoftLayer's datacenters exist in various cities and each contain one or more server rooms which house network and server infrastructure.
|
||||
func (r Location_Datacenter) GetViewableDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewableDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all viewable pop and datacenter locations.
|
||||
func (r Location_Datacenter) GetViewablePopsAndDataCenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablePopsAndDataCenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all viewable network locations.
|
||||
func (r Location_Datacenter) GetViewablepointOfPresence() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getViewablepointOfPresence", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve all point of presence locations.
|
||||
func (r Location_Datacenter) GetpointOfPresence() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Datacenter", "getpointOfPresence", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationGroupService returns an instance of the Location_Group SoftLayer service
|
||||
func GetLocationGroupService(sess *session.Session) Location_Group {
|
||||
return Location_Group{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Group) Id(id int) Location_Group {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group) Mask(mask string) Location_Group {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group) Filter(filter string) Location_Group {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group) Limit(limit int) Location_Group {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group) Offset(offset int) Location_Group {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group) GetAllObjects() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type for this location group.
|
||||
func (r Location_Group) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocationGroupType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The locations in a group.
|
||||
func (r Location_Group) GetLocations() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group", "getLocations", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group) GetObject() (resp datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Pricing struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationGroupPricingService returns an instance of the Location_Group_Pricing SoftLayer service
|
||||
func GetLocationGroupPricingService(sess *session.Session) Location_Group_Pricing {
|
||||
return Location_Group_Pricing{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Group_Pricing) Id(id int) Location_Group_Pricing {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Pricing) Mask(mask string) Location_Group_Pricing {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Pricing) Filter(filter string) Location_Group_Pricing {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Pricing) Limit(limit int) Location_Group_Pricing {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Pricing) Offset(offset int) Location_Group_Pricing {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group_Pricing) GetAllObjects() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type for this location group.
|
||||
func (r Location_Group_Pricing) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocationGroupType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The locations in a group.
|
||||
func (r Location_Group_Pricing) GetLocations() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getLocations", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group_Pricing) GetObject() (resp datatypes.Location_Group_Pricing, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
|
||||
func (r Location_Group_Pricing) GetPrices() (resp []datatypes.Product_Item_Price, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Pricing", "getPrices", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Group_Regional struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationGroupRegionalService returns an instance of the Location_Group_Regional SoftLayer service
|
||||
func GetLocationGroupRegionalService(sess *session.Session) Location_Group_Regional {
|
||||
return Location_Group_Regional{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Group_Regional) Id(id int) Location_Group_Regional {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Regional) Mask(mask string) Location_Group_Regional {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Regional) Filter(filter string) Location_Group_Regional {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Regional) Limit(limit int) Location_Group_Regional {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Group_Regional) Offset(offset int) Location_Group_Regional {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group_Regional) GetAllObjects() (resp []datatypes.Location_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The datacenters in a group.
|
||||
func (r Location_Group_Regional) GetDatacenters() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getDatacenters", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type for this location group.
|
||||
func (r Location_Group_Regional) GetLocationGroupType() (resp datatypes.Location_Group_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocationGroupType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The locations in a group.
|
||||
func (r Location_Group_Regional) GetLocations() (resp []datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getLocations", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Group_Regional) GetObject() (resp datatypes.Location_Group_Regional, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The preferred datacenters of a group.
|
||||
func (r Location_Group_Regional) GetPreferredDatacenter() (resp datatypes.Location_Datacenter, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Group_Regional", "getPreferredDatacenter", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationReservationService returns an instance of the Location_Reservation SoftLayer service
|
||||
func GetLocationReservationService(sess *session.Session) Location_Reservation {
|
||||
return Location_Reservation{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Reservation) Id(id int) Location_Reservation {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation) Mask(mask string) Location_Reservation {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation) Filter(filter string) Location_Reservation {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation) Limit(limit int) Location_Reservation {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation) Offset(offset int) Location_Reservation {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The account that a billing item belongs to.
|
||||
func (r Location_Reservation) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Reservation) GetAccountReservations() (resp []datatypes.Location_Reservation, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAccountReservations", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The bandwidth allotment that the reservation belongs to.
|
||||
func (r Location_Reservation) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getAllotment", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The bandwidth allotment that the reservation belongs to.
|
||||
func (r Location_Reservation) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The datacenter location that the reservation belongs to.
|
||||
func (r Location_Reservation) GetLocation() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getLocation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Rack information for the reservation
|
||||
func (r Location_Reservation) GetLocationReservationRack() (resp datatypes.Location_Reservation_Rack, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getLocationReservationRack", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Reservation) GetObject() (resp datatypes.Location_Reservation, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation_Rack struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationReservationRackService returns an instance of the Location_Reservation_Rack SoftLayer service
|
||||
func GetLocationReservationRackService(sess *session.Session) Location_Reservation_Rack {
|
||||
return Location_Reservation_Rack{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack) Id(id int) Location_Reservation_Rack {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack) Mask(mask string) Location_Reservation_Rack {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack) Filter(filter string) Location_Reservation_Rack {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack) Limit(limit int) Location_Reservation_Rack {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack) Offset(offset int) Location_Reservation_Rack {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The bandwidth allotment that the reservation belongs to.
|
||||
func (r Location_Reservation_Rack) GetAllotment() (resp datatypes.Network_Bandwidth_Version1_Allotment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getAllotment", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Members of the rack.
|
||||
func (r Location_Reservation_Rack) GetChildren() (resp []datatypes.Location_Reservation_Rack_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getChildren", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Reservation_Rack) GetLocation() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Reservation_Rack) GetLocationReservation() (resp datatypes.Location_Reservation, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getLocationReservation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Reservation_Rack) GetObject() (resp datatypes.Location_Reservation_Rack, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Location_Reservation_Rack_Member struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetLocationReservationRackMemberService returns an instance of the Location_Reservation_Rack_Member SoftLayer service
|
||||
func GetLocationReservationRackMemberService(sess *session.Session) Location_Reservation_Rack_Member {
|
||||
return Location_Reservation_Rack_Member{Session: sess}
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack_Member) Id(id int) Location_Reservation_Rack_Member {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack_Member) Mask(mask string) Location_Reservation_Rack_Member {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack_Member) Filter(filter string) Location_Reservation_Rack_Member {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack_Member) Limit(limit int) Location_Reservation_Rack_Member {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Location_Reservation_Rack_Member) Offset(offset int) Location_Reservation_Rack_Member {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve Location relation for the rack member
|
||||
func (r Location_Reservation_Rack_Member) GetLocation() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getLocation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Location_Reservation_Rack_Member) GetLocationReservationRack() (resp datatypes.Location_Reservation, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getLocationReservationRack", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Location_Reservation_Rack_Member) GetObject() (resp datatypes.Location_Reservation_Rack_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Location_Reservation_Rack_Member", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
148
vendor/github.com/softlayer/softlayer-go/services/marketplace.go
generated
vendored
Normal file
148
vendor/github.com/softlayer/softlayer-go/services/marketplace.go
generated
vendored
Normal file
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Marketplace_Partner struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMarketplacePartnerService returns an instance of the Marketplace_Partner SoftLayer service
|
||||
func GetMarketplacePartnerService(sess *session.Session) Marketplace_Partner {
|
||||
return Marketplace_Partner{Session: sess}
|
||||
}
|
||||
|
||||
func (r Marketplace_Partner) Id(id int) Marketplace_Partner {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Marketplace_Partner) Mask(mask string) Marketplace_Partner {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Marketplace_Partner) Filter(filter string) Marketplace_Partner {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Marketplace_Partner) Limit(limit int) Marketplace_Partner {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Marketplace_Partner) Offset(offset int) Marketplace_Partner {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetAllObjects() (resp []datatypes.Marketplace_Partner, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) {
|
||||
params := []interface{}{
|
||||
searchTerm,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAllPublishedPartners", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Marketplace_Partner) GetAttachments() (resp []datatypes.Marketplace_Partner_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getAttachments", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Marketplace_Partner, err error) {
|
||||
params := []interface{}{
|
||||
non,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFeaturedPartners", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetFile(name *string) (resp datatypes.Marketplace_Partner_File, err error) {
|
||||
params := []interface{}{
|
||||
name,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getFile", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Marketplace_Partner) GetLogoMedium() (resp datatypes.Marketplace_Partner_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getLogoMedium", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Marketplace_Partner) GetLogoMediumTemp() (resp datatypes.Marketplace_Partner_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getLogoMediumTemp", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Marketplace_Partner) GetLogoSmall() (resp datatypes.Marketplace_Partner_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getLogoSmall", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Marketplace_Partner) GetLogoSmallTemp() (resp datatypes.Marketplace_Partner_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getLogoSmallTemp", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetObject() (resp datatypes.Marketplace_Partner, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Marketplace_Partner) GetPartnerByUrlIdentifier(urlIdentifier *string) (resp datatypes.Marketplace_Partner, err error) {
|
||||
params := []interface{}{
|
||||
urlIdentifier,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Marketplace_Partner", "getPartnerByUrlIdentifier", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
234
vendor/github.com/softlayer/softlayer-go/services/metric.go
generated
vendored
Normal file
234
vendor/github.com/softlayer/softlayer-go/services/metric.go
generated
vendored
Normal file
|
@ -0,0 +1,234 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Metric tracking objects provides a common interface to all metrics provided by SoftLayer. These metrics range from network component traffic for a server to aggregated Bandwidth Pooling traffic and more. Every object within SoftLayer's range of objects that has data that can be tracked over time has an associated tracking object. Use the [[SoftLayer_Metric_Tracking_Object]] service to retrieve raw and graph data from a tracking object.
|
||||
type Metric_Tracking_Object struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMetricTrackingObjectService returns an instance of the Metric_Tracking_Object SoftLayer service
|
||||
func GetMetricTrackingObjectService(sess *session.Session) Metric_Tracking_Object {
|
||||
return Metric_Tracking_Object{Session: sess}
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object) Id(id int) Metric_Tracking_Object {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object) Mask(mask string) Metric_Tracking_Object {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object) Filter(filter string) Metric_Tracking_Object {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object) Limit(limit int) Metric_Tracking_Object {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object) Offset(offset int) Metric_Tracking_Object {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve a PNG image of the last 24 hours of bandwidth usage of one of SoftLayer's network backbones.
|
||||
func (r Metric_Tracking_Object) GetBackboneBandwidthGraph(graphTitle *string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
|
||||
params := []interface{}{
|
||||
graphTitle,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBackboneBandwidthGraph", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a collection of raw bandwidth data from an individual public or private network tracking object. Raw data is ideal if you with to employ your own traffic storage and graphing systems.
|
||||
func (r Metric_Tracking_Object) GetBandwidthData(startDateTime *datatypes.Time, endDateTime *datatypes.Time, typ *string, rollupSeconds *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
|
||||
params := []interface{}{
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
typ,
|
||||
rollupSeconds,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthData", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a PNG image of a bandwidth graph representing the bandwidth usage over time recorded by SofTLayer's bandwidth pollers.
|
||||
func (r Metric_Tracking_Object) GetBandwidthGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType *string, fontSize *int, graphWidth *int, graphHeight *int, doNotShowTimeZone *bool) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
|
||||
params := []interface{}{
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
graphType,
|
||||
fontSize,
|
||||
graphWidth,
|
||||
graphHeight,
|
||||
doNotShowTimeZone,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthGraph", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve the total amount of bandwidth recorded by a tracking object within the given date range. This method will only work on SoftLayer_Metric_Tracking_Object for SoftLayer_Hardware objects, and SoftLayer_Virtual_Guest objects.
|
||||
func (r Metric_Tracking_Object) GetBandwidthTotal(startDateTime *datatypes.Time, endDateTime *datatypes.Time, direction *string, typ *string) (resp uint, err error) {
|
||||
params := []interface{}{
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
direction,
|
||||
typ,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getBandwidthTotal", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns a graph container instance that is populated with metric data for the tracking object.
|
||||
func (r Metric_Tracking_Object) GetCustomGraphData(graphContainer *datatypes.Container_Graph) (resp datatypes.Container_Graph, err error) {
|
||||
params := []interface{}{
|
||||
graphContainer,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getCustomGraphData", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a collection of detailed metric data over a date range. Ideal if you want to employ your own graphing systems. Note not all metrics support this method. Those that do not return null.
|
||||
func (r Metric_Tracking_Object) GetDetailsForDateRange(startDate *datatypes.Time, endDate *datatypes.Time, graphType []string) (resp []datatypes.Container_Metric_Tracking_Object_Details, err error) {
|
||||
params := []interface{}{
|
||||
startDate,
|
||||
endDate,
|
||||
graphType,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getDetailsForDateRange", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a PNG image of a metric in graph form.
|
||||
func (r Metric_Tracking_Object) GetGraph(startDateTime *datatypes.Time, endDateTime *datatypes.Time, graphType []string) (resp datatypes.Container_Bandwidth_GraphOutputs, err error) {
|
||||
params := []interface{}{
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
graphType,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getGraph", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns a collection of metric data types that can be retrieved for a metric tracking object.
|
||||
func (r Metric_Tracking_Object) GetMetricDataTypes() (resp []datatypes.Container_Metric_Data_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getMetricDataTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Metric_Tracking_Object object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Metric_Tracking_Object service. You can only tracking objects that are associated with your SoftLayer account or services.
|
||||
func (r Metric_Tracking_Object) GetObject() (resp datatypes.Metric_Tracking_Object, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve a metric summary. Ideal if you want to employ your own graphing systems. Note not all metric types contain a summary. These return null.
|
||||
func (r Metric_Tracking_Object) GetSummary(graphType *string) (resp datatypes.Container_Metric_Tracking_Object_Summary, err error) {
|
||||
params := []interface{}{
|
||||
graphType,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummary", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns summarized metric data for the date range, metric type and summary period provided.
|
||||
func (r Metric_Tracking_Object) GetSummaryData(startDateTime *datatypes.Time, endDateTime *datatypes.Time, validTypes []datatypes.Container_Metric_Data_Type, summaryPeriod *int) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
|
||||
params := []interface{}{
|
||||
startDateTime,
|
||||
endDateTime,
|
||||
validTypes,
|
||||
summaryPeriod,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getSummaryData", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type of data that a tracking object polls.
|
||||
func (r Metric_Tracking_Object) GetType() (resp datatypes.Metric_Tracking_Object_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object", "getType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This data type provides commonly used bandwidth summary components for the current billing cycle.
|
||||
type Metric_Tracking_Object_Bandwidth_Summary struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMetricTrackingObjectBandwidthSummaryService returns an instance of the Metric_Tracking_Object_Bandwidth_Summary SoftLayer service
|
||||
func GetMetricTrackingObjectBandwidthSummaryService(sess *session.Session) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
return Metric_Tracking_Object_Bandwidth_Summary{Session: sess}
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) Id(id int) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) Mask(mask string) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) Filter(filter string) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) Limit(limit int) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) Offset(offset int) Metric_Tracking_Object_Bandwidth_Summary {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Metric_Tracking_Object_Bandwidth_Summary) GetObject() (resp datatypes.Metric_Tracking_Object_Bandwidth_Summary, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Metric_Tracking_Object_Bandwidth_Summary", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
685
vendor/github.com/softlayer/softlayer-go/services/monitoring.go
generated
vendored
Normal file
685
vendor/github.com/softlayer/softlayer-go/services/monitoring.go
generated
vendored
Normal file
|
@ -0,0 +1,685 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// A monitoring agent object contains information describing the agent.
|
||||
type Monitoring_Agent struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringAgentService returns an instance of the Monitoring_Agent SoftLayer service
|
||||
func GetMonitoringAgentService(sess *session.Session) Monitoring_Agent {
|
||||
return Monitoring_Agent{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent) Id(id int) Monitoring_Agent {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent) Mask(mask string) Monitoring_Agent {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent) Filter(filter string) Monitoring_Agent {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent) Limit(limit int) Monitoring_Agent {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent) Offset(offset int) Monitoring_Agent {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method activates a SoftLayer_Monitoring_Agent.
|
||||
func (r Monitoring_Agent) Activate() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "activate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method is used to apply changes to a monitoring agent's configuration for SoftLayer_Configuration_Template_Section with the property sectionType that has a keyName of 'TEMPLATE_SECTION'. Configuration values that are passed in can be new or updated objects but must have a definitionId and profileId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition's from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. It returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied. Some configuration sections act as a template which helps to create additional monitoring configurations. For instance, Core Resource monitoring agent lets you create monitoring configurations for different disk volumes or disk path.
|
||||
func (r Monitoring_Agent) AddConfigurationProfile(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) {
|
||||
params := []interface{}{
|
||||
configurationValues,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "addConfigurationProfile", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method creates a transaction used to apply changes to a monitoring agent's configuration for an array of SoftLayer_Configuration_Template_Section that have the property sectionType with a name of 'Fixed section'. Configuration values that are passed in can be new or updated objects but must have a configurationDefinitionId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. This method returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied.
|
||||
func (r Monitoring_Agent) ApplyConfigurationValues(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) {
|
||||
params := []interface{}{
|
||||
configurationValues,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "applyConfigurationValues", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method will deactivate the monitoring agent, preventing it from generating any further alarms.
|
||||
func (r Monitoring_Agent) Deactivate() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deactivate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method will remove a SoftLayer_Configuration_Template_Section_Profile from a SoftLayer_Configuration_Template_Section by passing in the sectionId of the profile object and identifier of the profile. This will execute the action immediately on the server and the SoftLayer_Configuration_Template_Section returning a boolean true if successful.
|
||||
func (r Monitoring_Agent) DeleteConfigurationProfile(sectionId *int, profileId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
sectionId,
|
||||
profileId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deleteConfigurationProfile", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Initialize a monitoring agent and deploy it with the SoftLayer_Configuration_Template with the same identifier as the $configurationTemplateId parameter. If the configuration template ID is not provided, the current configuration template will be used. When executing this method, the existing configuration values will be lost. If no configuration template identifier is provided, the current configuration template will be used. '''Warning''' Reporting data may be lost as a result of executing this method.
|
||||
func (r Monitoring_Agent) DeployMonitoringAgent(configurationTemplateId *int) (resp datatypes.Provisioning_Version1_Transaction, err error) {
|
||||
params := []interface{}{
|
||||
configurationTemplateId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deployMonitoringAgent", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves an array of SoftLayer_Notification_User_Subscriber objects belonging to the SoftLayer_Monitoring_Agent which are able to receive alarm notifications.
|
||||
func (r Monitoring_Agent) GetActiveAlarmSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getActiveAlarmSubscribers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The current status of the corresponding agent
|
||||
func (r Monitoring_Agent) GetAgentStatus() (resp datatypes.Monitoring_Agent_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAgentStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns an array of available SoftLayer_Configuration_Template objects for this monitoring agent.
|
||||
func (r Monitoring_Agent) GetAvailableConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationTemplates", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns an array of available configuration values that are specific to a server or a Virtual that this monitoring agent is running on. For example, invoking this method against "Network Traffic Monitoring Agent" will return all available network adapters on your system.
|
||||
func (r Monitoring_Agent) GetAvailableConfigurationValues(configurationDefinitionId *int, configValues []datatypes.Monitoring_Agent_Configuration_Value) (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) {
|
||||
params := []interface{}{
|
||||
configurationDefinitionId,
|
||||
configValues,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationValues", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve All custom configuration profiles associated with the corresponding agent
|
||||
func (r Monitoring_Agent) GetConfigurationProfiles() (resp []datatypes.Configuration_Template_Section_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationProfiles", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A template of an agent's current configuration which contains information about the structure of the configuration values.
|
||||
func (r Monitoring_Agent) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The values associated with the corresponding Agent configuration.
|
||||
func (r Monitoring_Agent) GetConfigurationValues() (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationValues", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns an array of SoftLayer_User_Customer objects, representing those who are allowed to be used as alarm subscribers.
|
||||
func (r Monitoring_Agent) GetEligibleAlarmSubscibers() (resp []datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getEligibleAlarmSubscibers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns a SoftLayer_Container_Bandwidth_GraphOutputs object containing a base64 PNG string graph of the provided configuration values for the given begin and end dates.
|
||||
func (r Monitoring_Agent) GetGraph(configurationValues []datatypes.Monitoring_Agent_Configuration_Value, beginDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Container_Monitoring_Graph_Outputs, err error) {
|
||||
params := []interface{}{
|
||||
configurationValues,
|
||||
beginDate,
|
||||
endDate,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraph", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns the metric data for each of the configuration values provided during the given time range.
|
||||
func (r Monitoring_Agent) GetGraphData(metricDataTypes []datatypes.Container_Metric_Data_Type, startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) {
|
||||
params := []interface{}{
|
||||
metricDataTypes,
|
||||
startDate,
|
||||
endDate,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraphData", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve SoftLayer hardware related to the agent.
|
||||
func (r Monitoring_Agent) GetHardware() (resp datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves a monitoring agent whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent service.
|
||||
func (r Monitoring_Agent) GetObject() (resp datatypes.Monitoring_Agent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Contains general information relating to a single SoftLayer product.
|
||||
func (r Monitoring_Agent) GetProductItem() (resp datatypes.Product_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getProductItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A description for a specific installation of a Software Component
|
||||
func (r Monitoring_Agent) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Monitoring agent status name.
|
||||
func (r Monitoring_Agent) GetStatusName() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getStatusName", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Softlayer_Virtual_Guest object related to the monitoring agent, which this virtual guest object and hardware is on the server of the running agent.
|
||||
func (r Monitoring_Agent) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getVirtualGuest", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Use of this method will allow removing active subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration.
|
||||
func (r Monitoring_Agent) RemoveActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
userRecordId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeActiveAlarmSubscriber", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Use of this method will allow removing all subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration.
|
||||
func (r Monitoring_Agent) RemoveAllAlarmSubscribers() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeAllAlarmSubscribers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method restarts a monitoring agent and sets the agent's status to 'ACTIVE'.
|
||||
func (r Monitoring_Agent) RestartMonitoringAgent() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "restartMonitoringAgent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method assigns a user to receive the alerts generated by this SoftLayer_Monitoring_Agent.
|
||||
func (r Monitoring_Agent) SetActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
userRecordId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "setActiveAlarmSubscriber", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Monitoring_Agent_Configuration_Template_Group class is consisted of configuration templates for agents in a monitoring package.
|
||||
type Monitoring_Agent_Configuration_Template_Group struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringAgentConfigurationTemplateGroupService returns an instance of the Monitoring_Agent_Configuration_Template_Group SoftLayer service
|
||||
func GetMonitoringAgentConfigurationTemplateGroupService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group {
|
||||
return Monitoring_Agent_Configuration_Template_Group{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) Id(id int) Monitoring_Agent_Configuration_Template_Group {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) Mask(mask string) Monitoring_Agent_Configuration_Template_Group {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) Filter(filter string) Monitoring_Agent_Configuration_Template_Group {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) Limit(limit int) Monitoring_Agent_Configuration_Template_Group {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) Offset(offset int) Monitoring_Agent_Configuration_Template_Group {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method creates a SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values provided in the template object. The template objects accountId will be overridden to use the active user's accountId as it shows on their associated SoftLayer_User_Customer object.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Deletes a customer configuration template group.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method edits an existing SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values passed in the $object parameter. The $object parameter should use the same structure as a SoftLayer_Monitoring_Agent_Configuration_Template_Group object.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves an array of SoftLayer_Monitoring_Agent_Configuration_Template_Group objects that are available to the active user's account. The packageId parameter is not currently used.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationGroups(packageId *int) (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
params := []interface{}{
|
||||
packageId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationGroups", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationTemplateReferences() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationTemplateReferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationTemplates", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetItem() (resp datatypes.Product_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves a monitoring agent configuration template group whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group service.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference class holds the reference information, essentially a SQL join, between a monitoring configuration group and agent configuration templates.
|
||||
type Monitoring_Agent_Configuration_Template_Group_Reference struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringAgentConfigurationTemplateGroupReferenceService returns an instance of the Monitoring_Agent_Configuration_Template_Group_Reference SoftLayer service
|
||||
func GetMonitoringAgentConfigurationTemplateGroupReferenceService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
return Monitoring_Agent_Configuration_Template_Group_Reference{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) Id(id int) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) Mask(mask string) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) Filter(filter string) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) Limit(limit int) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) Offset(offset int) Monitoring_Agent_Configuration_Template_Group_Reference {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method creates a monitoring agent configuration template group reference by passing in an object with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObject parameter.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method creates monitoring agent configuration template group references by passing in an array of objects with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObjects parameter. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is created.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method updates a SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference record by passing in a modified instance of the object.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method updates a set of SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference records by passing in an array of modified instances of the objects. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is updated.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves all SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference objects accessible to the active user.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getConfigurationTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method retrieves a monitoring agent configuration template group reference whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference service.
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetTemplateGroup() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getTemplateGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Monitoring agent configuration value
|
||||
type Monitoring_Agent_Configuration_Value struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringAgentConfigurationValueService returns an instance of the Monitoring_Agent_Configuration_Value SoftLayer service
|
||||
func GetMonitoringAgentConfigurationValueService(sess *session.Session) Monitoring_Agent_Configuration_Value {
|
||||
return Monitoring_Agent_Configuration_Value{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Value) Id(id int) Monitoring_Agent_Configuration_Value {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Value) Mask(mask string) Monitoring_Agent_Configuration_Value {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Value) Filter(filter string) Monitoring_Agent_Configuration_Value {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Value) Limit(limit int) Monitoring_Agent_Configuration_Value {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Configuration_Value) Offset(offset int) Monitoring_Agent_Configuration_Value {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Value) GetDefinition() (resp datatypes.Configuration_Template_Section_Definition, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getDefinition", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The metric data type used to retrieve metric data currently being tracked.
|
||||
func (r Monitoring_Agent_Configuration_Value) GetMetricDataType() (resp datatypes.Container_Metric_Data_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMetricDataType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Value) GetMonitoringAgent() (resp datatypes.Monitoring_Agent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMonitoringAgent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Monitoring_Agent_Configuration_Value) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Value, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Monitoring_Agent_Configuration_Value) GetProfile() (resp datatypes.Configuration_Template_Section_Profile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getProfile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Monitoring agent status
|
||||
type Monitoring_Agent_Status struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringAgentStatusService returns an instance of the Monitoring_Agent_Status SoftLayer service
|
||||
func GetMonitoringAgentStatusService(sess *session.Session) Monitoring_Agent_Status {
|
||||
return Monitoring_Agent_Status{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Status) Id(id int) Monitoring_Agent_Status {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Status) Mask(mask string) Monitoring_Agent_Status {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Status) Filter(filter string) Monitoring_Agent_Status {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Status) Limit(limit int) Monitoring_Agent_Status {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Agent_Status) Offset(offset int) Monitoring_Agent_Status {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Monitoring_Agent_Status) GetObject() (resp datatypes.Monitoring_Agent_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Status", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Monitoring_Robot data type contains general information relating to a monitoring robot.
|
||||
type Monitoring_Robot struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetMonitoringRobotService returns an instance of the Monitoring_Robot SoftLayer service
|
||||
func GetMonitoringRobotService(sess *session.Session) Monitoring_Robot {
|
||||
return Monitoring_Robot{Session: sess}
|
||||
}
|
||||
|
||||
func (r Monitoring_Robot) Id(id int) Monitoring_Robot {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Robot) Mask(mask string) Monitoring_Robot {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Robot) Filter(filter string) Monitoring_Robot {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Robot) Limit(limit int) Monitoring_Robot {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Monitoring_Robot) Offset(offset int) Monitoring_Robot {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Checks if a monitoring robot can communicate with SoftLayer monitoring management system via the private network.
|
||||
//
|
||||
// TCP port 48000 - 48002 must be open on your server or your virtual server in order for this test to succeed.
|
||||
func (r Monitoring_Robot) CheckConnection() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "checkConnection", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Monitoring_Robot) DeployMonitoringAgents(configurationTemplateGroup *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp datatypes.Provisioning_Version1_Transaction, err error) {
|
||||
params := []interface{}{
|
||||
configurationTemplateGroup,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "deployMonitoringAgents", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The account associated with the corresponding robot.
|
||||
func (r Monitoring_Robot) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns available configuration template groups for this monitoring agent.
|
||||
func (r Monitoring_Robot) GetAvailableConfigurationGroups() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getAvailableConfigurationGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The program (monitoring agent) that gets details of a system or application and reporting of the metric data and triggers alarms for predefined events.
|
||||
func (r Monitoring_Robot) GetMonitoringAgents() (resp []datatypes.Monitoring_Agent, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getMonitoringAgents", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Monitoring_Robot) GetObject() (resp datatypes.Monitoring_Robot, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The current status of the robot.
|
||||
func (r Monitoring_Robot) GetRobotStatus() (resp datatypes.Monitoring_Robot_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getRobotStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The SoftLayer_Software_Component that corresponds to the robot installation on the server.
|
||||
func (r Monitoring_Robot) GetSoftwareComponent() (resp datatypes.Software_Component, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getSoftwareComponent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// If our monitoring management system is not able to connect to your monitoring robot, it sets the robot status to "Limited Connectivity". Robots in this status will not be process by our monitoring management system. You cannot manage monitoring agents either.
|
||||
//
|
||||
// Use this method to resets monitoring robot status to "Active" to indicate the connection issue is resolved.
|
||||
func (r Monitoring_Robot) ResetStatus() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "resetStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
13667
vendor/github.com/softlayer/softlayer-go/services/network.go
generated
vendored
Normal file
13667
vendor/github.com/softlayer/softlayer-go/services/network.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
892
vendor/github.com/softlayer/softlayer-go/services/notification.go
generated
vendored
Normal file
892
vendor/github.com/softlayer/softlayer-go/services/notification.go
generated
vendored
Normal file
|
@ -0,0 +1,892 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Details provided for the notification are basic. Details such as the related preferences, name and keyname for the notification can be retrieved. The keyname property for the notification can be used to refer to a notification when integrating into the SoftLayer Notification system. The name property can used more for display purposes.
|
||||
type Notification struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationService returns an instance of the Notification SoftLayer service
|
||||
func GetNotificationService(sess *session.Session) Notification {
|
||||
return Notification{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification) Id(id int) Notification {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification) Mask(mask string) Notification {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification) Filter(filter string) Notification {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification) Limit(limit int) Notification {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification) Offset(offset int) Notification {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use this method to retrieve all active notifications that can be subscribed to.
|
||||
func (r Notification) GetAllObjects() (resp []datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification) GetObject() (resp datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The preferences related to the notification. These are preferences are configurable and optional for subscribers to use.
|
||||
func (r Notification) GetPreferences() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification", "getPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference.
|
||||
func (r Notification) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification", "getRequiredPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This is an extension of the SoftLayer_Notification class. These are implementation details specific to those notifications which can be subscribed to and received on a mobile device.
|
||||
type Notification_Mobile struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationMobileService returns an instance of the Notification_Mobile SoftLayer service
|
||||
func GetNotificationMobileService(sess *session.Session) Notification_Mobile {
|
||||
return Notification_Mobile{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_Mobile) Id(id int) Notification_Mobile {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Mobile) Mask(mask string) Notification_Mobile {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Mobile) Filter(filter string) Notification_Mobile {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Mobile) Limit(limit int) Notification_Mobile {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Mobile) Offset(offset int) Notification_Mobile {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Create a new subscriber for a given resource.
|
||||
func (r Notification_Mobile) CreateSubscriberForMobileDevice(keyName *string, resourceTableId *int, userRecordId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
keyName,
|
||||
resourceTableId,
|
||||
userRecordId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "createSubscriberForMobileDevice", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Use this method to retrieve all active notifications that can be subscribed to.
|
||||
func (r Notification_Mobile) GetAllObjects() (resp []datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Mobile) GetObject() (resp datatypes.Notification_Mobile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The preferences related to the notification. These are preferences are configurable and optional for subscribers to use.
|
||||
func (r Notification_Mobile) GetPreferences() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The required preferences related to the notification. While configurable, the subscriber does not have the option whether to use the preference.
|
||||
func (r Notification_Mobile) GetRequiredPreferences() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Mobile", "getRequiredPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Notification_Occurrence_Event struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationOccurrenceEventService returns an instance of the Notification_Occurrence_Event SoftLayer service
|
||||
func GetNotificationOccurrenceEventService(sess *session.Session) Notification_Occurrence_Event {
|
||||
return Notification_Occurrence_Event{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_Event) Id(id int) Notification_Occurrence_Event {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_Event) Mask(mask string) Notification_Occurrence_Event {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_Event) Filter(filter string) Notification_Occurrence_Event {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_Event) Limit(limit int) Notification_Occurrence_Event {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_Event) Offset(offset int) Notification_Occurrence_Event {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// <<<< EOT
|
||||
func (r Notification_Occurrence_Event) AcknowledgeNotification() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "acknowledgeNotification", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Indicates whether or not this event has been acknowledged by the user.
|
||||
func (r Notification_Occurrence_Event) GetAcknowledgedFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAcknowledgedFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_Event) GetAllObjects() (resp []datatypes.Notification_Occurrence_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve the contents of the file attached to a SoftLayer event by it's given identifier.
|
||||
func (r Notification_Occurrence_Event) GetAttachedFile(attachmentId *int) (resp []byte, err error) {
|
||||
params := []interface{}{
|
||||
attachmentId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachedFile", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A collection of attachments for this event which provide supplementary information to impacted users some examples are RFO (Reason For Outage) and root cause analysis documents.
|
||||
func (r Notification_Occurrence_Event) GetAttachments() (resp []datatypes.Notification_Occurrence_Event_Attachment, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getAttachments", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The first update for this event.
|
||||
func (r Notification_Occurrence_Event) GetFirstUpdate() (resp datatypes.Notification_Occurrence_Update, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getFirstUpdate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method will return the number of impacted owned accounts associated with this event for the current user.
|
||||
func (r Notification_Occurrence_Event) GetImpactedAccountCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccountCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A collection of accounts impacted by this event. Each impacted account record relates directly to a [[SoftLayer_Account]].
|
||||
func (r Notification_Occurrence_Event) GetImpactedAccounts() (resp []datatypes.Notification_Occurrence_Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedAccounts", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method will return the number of impacted devices associated with this event for the current user.
|
||||
func (r Notification_Occurrence_Event) GetImpactedDeviceCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDeviceCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method will return a collection of SoftLayer_Notification_Occurrence_Resource objects which is a listing of the current users' impacted devices that are associated with this event.
|
||||
func (r Notification_Occurrence_Event) GetImpactedDevices() (resp []datatypes.Notification_Occurrence_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedDevices", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A collection of resources impacted by this event. Each record will relate to some physical resource that the user has access to such as [[SoftLayer_Hardware]] or [[SoftLayer_Virtual_Guest]].
|
||||
func (r Notification_Occurrence_Event) GetImpactedResources() (resp []datatypes.Notification_Occurrence_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedResources", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A collection of users impacted by this event. Each impacted user record relates directly to a [[SoftLayer_User_Customer]].
|
||||
func (r Notification_Occurrence_Event) GetImpactedUsers() (resp []datatypes.Notification_Occurrence_User, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getImpactedUsers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The last update for this event.
|
||||
func (r Notification_Occurrence_Event) GetLastUpdate() (resp datatypes.Notification_Occurrence_Update, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getLastUpdate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type of event such as planned or unplanned maintenance.
|
||||
func (r Notification_Occurrence_Event) GetNotificationOccurrenceEventType() (resp datatypes.Notification_Occurrence_Event_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getNotificationOccurrenceEventType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_Event) GetObject() (resp datatypes.Notification_Occurrence_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Notification_Occurrence_Event) GetStatusCode() (resp datatypes.Notification_Occurrence_Status_Code, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getStatusCode", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve All updates for this event.
|
||||
func (r Notification_Occurrence_Event) GetUpdates() (resp []datatypes.Notification_Occurrence_Update, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_Event", "getUpdates", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This type contains general information relating to a user that may be impacted by a [[SoftLayer_Notification_Occurrence_Event]].
|
||||
type Notification_Occurrence_User struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationOccurrenceUserService returns an instance of the Notification_Occurrence_User SoftLayer service
|
||||
func GetNotificationOccurrenceUserService(sess *session.Session) Notification_Occurrence_User {
|
||||
return Notification_Occurrence_User{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_User) Id(id int) Notification_Occurrence_User {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_User) Mask(mask string) Notification_Occurrence_User {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_User) Filter(filter string) Notification_Occurrence_User {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_User) Limit(limit int) Notification_Occurrence_User {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_Occurrence_User) Offset(offset int) Notification_Occurrence_User {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_User) Acknowledge() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "acknowledge", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_User) GetAllObjects() (resp []datatypes.Notification_Occurrence_User, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_User) GetImpactedDeviceCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedDeviceCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A collection of resources impacted by the associated event.
|
||||
func (r Notification_Occurrence_User) GetImpactedResources() (resp []datatypes.Notification_Occurrence_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getImpactedResources", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The associated event.
|
||||
func (r Notification_Occurrence_User) GetNotificationOccurrenceEvent() (resp datatypes.Notification_Occurrence_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getNotificationOccurrenceEvent", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_Occurrence_User) GetObject() (resp datatypes.Notification_Occurrence_User, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The impacted user.
|
||||
func (r Notification_Occurrence_User) GetUser() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_Occurrence_User", "getUser", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationUserSubscriberService returns an instance of the Notification_User_Subscriber SoftLayer service
|
||||
func GetNotificationUserSubscriberService(sess *session.Session) Notification_User_Subscriber {
|
||||
return Notification_User_Subscriber{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber) Id(id int) Notification_User_Subscriber {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber) Mask(mask string) Notification_User_Subscriber {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber) Filter(filter string) Notification_User_Subscriber {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber) Limit(limit int) Notification_User_Subscriber {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber) Offset(offset int) Notification_User_Subscriber {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use the method to create a new subscription for a notification. This method is the entry method to the notification system. Certain properties are required to create a subscription while others are optional.
|
||||
//
|
||||
// The required property is the resourceRecord property which is type SoftLayer_Notification_User_Subscriber_Resource. For the resourceRecord property, the only property that needs to be populated is the resourceTableId. The resourceTableId is the unique identifier of a SoftLayer service to create the subscription for. For example, the unique identifier of the Storage Evault service to create the subscription on.
|
||||
//
|
||||
// Optional properties that can be set is the preferences property. The preference property is an array SoftLayer_Notification_User_Subscriber_Preference. By default, the system will populate the preferences with the default values if no preferences are passed in. The preferences passed in must be the preferences related to the notification subscribing to. The notification preferences and preference details (such as minimum and maximum values) can be retrieved using the SoftLayer_Notification service. The properties that need to be populated for preferences are the notificationPreferenceId and value.
|
||||
//
|
||||
// For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure:
|
||||
//
|
||||
//
|
||||
// *userRecordId = 1111
|
||||
// *notificationId = 3
|
||||
// *resourceRecord
|
||||
// **resourceTableId = 1234
|
||||
// *preferences[1]
|
||||
// **notificationPreferenceId = 2
|
||||
// **value = 85
|
||||
// *preference[2]
|
||||
// **notificationPreferenceId = 3
|
||||
// **value = 15
|
||||
//
|
||||
//
|
||||
func (r Notification_User_Subscriber) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The subscriber's subscription status can be "turned off" or "turned on" if the subscription is not required.
|
||||
//
|
||||
// Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20
|
||||
//
|
||||
//
|
||||
// *id = 1111
|
||||
// *active = 1
|
||||
// *preferences[1]
|
||||
// **id = 11
|
||||
// **value = 90
|
||||
// *preference[2]
|
||||
// **id = 12
|
||||
// **value = 20
|
||||
func (r Notification_User_Subscriber) EditObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The delivery methods used to send the subscribed notification.
|
||||
func (r Notification_User_Subscriber) GetDeliveryMethods() (resp []datatypes.Notification_Delivery_Method, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getDeliveryMethods", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Notification subscribed to.
|
||||
func (r Notification_User_Subscriber) GetNotification() (resp datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getNotification", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber) GetObject() (resp datatypes.Notification_User_Subscriber, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Associated subscriber preferences used for the notification subscription. For example, preferences include number of deliveries (limit) and threshold.
|
||||
func (r Notification_User_Subscriber) GetPreferences() (resp []datatypes.Notification_User_Subscriber_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure.
|
||||
func (r Notification_User_Subscriber) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getPreferencesDetails", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The subscriber id to resource id mapping.
|
||||
func (r Notification_User_Subscriber) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getResourceRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve User record for the subscription.
|
||||
func (r Notification_User_Subscriber) GetUserRecord() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber", "getUserRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber_Billing struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationUserSubscriberBillingService returns an instance of the Notification_User_Subscriber_Billing SoftLayer service
|
||||
func GetNotificationUserSubscriberBillingService(sess *session.Session) Notification_User_Subscriber_Billing {
|
||||
return Notification_User_Subscriber_Billing{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Billing) Id(id int) Notification_User_Subscriber_Billing {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Billing) Mask(mask string) Notification_User_Subscriber_Billing {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Billing) Filter(filter string) Notification_User_Subscriber_Billing {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Billing) Limit(limit int) Notification_User_Subscriber_Billing {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Billing) Offset(offset int) Notification_User_Subscriber_Billing {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use the method to create a new subscription for a notification. This method is the entry method to the notification system. Certain properties are required to create a subscription while others are optional.
|
||||
//
|
||||
// The required property is the resourceRecord property which is type SoftLayer_Notification_User_Subscriber_Resource. For the resourceRecord property, the only property that needs to be populated is the resourceTableId. The resourceTableId is the unique identifier of a SoftLayer service to create the subscription for. For example, the unique identifier of the Storage Evault service to create the subscription on.
|
||||
//
|
||||
// Optional properties that can be set is the preferences property. The preference property is an array SoftLayer_Notification_User_Subscriber_Preference. By default, the system will populate the preferences with the default values if no preferences are passed in. The preferences passed in must be the preferences related to the notification subscribing to. The notification preferences and preference details (such as minimum and maximum values) can be retrieved using the SoftLayer_Notification service. The properties that need to be populated for preferences are the notificationPreferenceId and value.
|
||||
//
|
||||
// For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure:
|
||||
//
|
||||
//
|
||||
// *userRecordId = 1111
|
||||
// *notificationId = 3
|
||||
// *resourceRecord
|
||||
// **resourceTableId = 1234
|
||||
// *preferences[1]
|
||||
// **notificationPreferenceId = 2
|
||||
// **value = 85
|
||||
// *preference[2]
|
||||
// **notificationPreferenceId = 3
|
||||
// **value = 15
|
||||
//
|
||||
//
|
||||
func (r Notification_User_Subscriber_Billing) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The subscriber's subscription status can be "turned off" or "turned on" if the subscription is not required.
|
||||
//
|
||||
// Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20
|
||||
//
|
||||
//
|
||||
// *id = 1111
|
||||
// *active = 1
|
||||
// *preferences[1]
|
||||
// **id = 11
|
||||
// **value = 90
|
||||
// *preference[2]
|
||||
// **id = 12
|
||||
// **value = 20
|
||||
func (r Notification_User_Subscriber_Billing) EditObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The delivery methods used to send the subscribed notification.
|
||||
func (r Notification_User_Subscriber_Billing) GetDeliveryMethods() (resp []datatypes.Notification_Delivery_Method, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getDeliveryMethods", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Notification subscribed to.
|
||||
func (r Notification_User_Subscriber_Billing) GetNotification() (resp datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getNotification", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Billing) GetObject() (resp datatypes.Notification_User_Subscriber_Billing, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Associated subscriber preferences used for the notification subscription. For example, preferences include number of deliveries (limit) and threshold.
|
||||
func (r Notification_User_Subscriber_Billing) GetPreferences() (resp []datatypes.Notification_User_Subscriber_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure.
|
||||
func (r Notification_User_Subscriber_Billing) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getPreferencesDetails", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The subscriber id to resource id mapping.
|
||||
func (r Notification_User_Subscriber_Billing) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getResourceRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve User record for the subscription.
|
||||
func (r Notification_User_Subscriber_Billing) GetUserRecord() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Billing", "getUserRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A notification subscriber will have details pertaining to the subscriber's notification subscription. You can receive details such as preferences, details of the preferences, delivery methods and the delivery methods for the subscriber.
|
||||
//
|
||||
// NOTE: There are preferences and delivery methods that cannot be modified. Also, there are some subscriptions that are required.
|
||||
type Notification_User_Subscriber_Mobile struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationUserSubscriberMobileService returns an instance of the Notification_User_Subscriber_Mobile SoftLayer service
|
||||
func GetNotificationUserSubscriberMobileService(sess *session.Session) Notification_User_Subscriber_Mobile {
|
||||
return Notification_User_Subscriber_Mobile{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Mobile) Id(id int) Notification_User_Subscriber_Mobile {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Mobile) Mask(mask string) Notification_User_Subscriber_Mobile {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Mobile) Filter(filter string) Notification_User_Subscriber_Mobile {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Mobile) Limit(limit int) Notification_User_Subscriber_Mobile {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Mobile) Offset(offset int) Notification_User_Subscriber_Mobile {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Mobile) ClearSnoozeTimer() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "clearSnoozeTimer", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Use the method to create a new subscription for a notification. This method is the entry method to the notification system. Certain properties are required to create a subscription while others are optional.
|
||||
//
|
||||
// The required property is the resourceRecord property which is type SoftLayer_Notification_User_Subscriber_Resource. For the resourceRecord property, the only property that needs to be populated is the resourceTableId. The resourceTableId is the unique identifier of a SoftLayer service to create the subscription for. For example, the unique identifier of the Storage Evault service to create the subscription on.
|
||||
//
|
||||
// Optional properties that can be set is the preferences property. The preference property is an array SoftLayer_Notification_User_Subscriber_Preference. By default, the system will populate the preferences with the default values if no preferences are passed in. The preferences passed in must be the preferences related to the notification subscribing to. The notification preferences and preference details (such as minimum and maximum values) can be retrieved using the SoftLayer_Notification service. The properties that need to be populated for preferences are the notificationPreferenceId and value.
|
||||
//
|
||||
// For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure:
|
||||
//
|
||||
//
|
||||
// *userRecordId = 1111
|
||||
// *notificationId = 3
|
||||
// *resourceRecord
|
||||
// **resourceTableId = 1234
|
||||
// *preferences[1]
|
||||
// **notificationPreferenceId = 2
|
||||
// **value = 85
|
||||
// *preference[2]
|
||||
// **notificationPreferenceId = 3
|
||||
// **value = 15
|
||||
//
|
||||
//
|
||||
func (r Notification_User_Subscriber_Mobile) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The subscriber's subscription status can be "turned off" or "turned on" if the subscription is not required.
|
||||
//
|
||||
// Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20
|
||||
//
|
||||
//
|
||||
// *id = 1111
|
||||
// *active = 1
|
||||
// *preferences[1]
|
||||
// **id = 11
|
||||
// **value = 90
|
||||
// *preference[2]
|
||||
// **id = 12
|
||||
// **value = 20
|
||||
func (r Notification_User_Subscriber_Mobile) EditObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The delivery methods used to send the subscribed notification.
|
||||
func (r Notification_User_Subscriber_Mobile) GetDeliveryMethods() (resp []datatypes.Notification_Delivery_Method, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getDeliveryMethods", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Notification subscribed to.
|
||||
func (r Notification_User_Subscriber_Mobile) GetNotification() (resp datatypes.Notification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getNotification", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Mobile) GetObject() (resp datatypes.Notification_User_Subscriber_Mobile, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Associated subscriber preferences used for the notification subscription. For example, preferences include number of deliveries (limit) and threshold.
|
||||
func (r Notification_User_Subscriber_Mobile) GetPreferences() (resp []datatypes.Notification_User_Subscriber_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Preference details such as description, minimum and maximum limits, default value and unit of measure.
|
||||
func (r Notification_User_Subscriber_Mobile) GetPreferencesDetails() (resp []datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getPreferencesDetails", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The subscriber id to resource id mapping.
|
||||
func (r Notification_User_Subscriber_Mobile) GetResourceRecord() (resp datatypes.Notification_User_Subscriber_Resource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getResourceRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve User record for the subscription.
|
||||
func (r Notification_User_Subscriber_Mobile) GetUserRecord() (resp datatypes.User_Customer, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "getUserRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Mobile) SetSnoozeTimer(start *int, end *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
start,
|
||||
end,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Mobile", "setSnoozeTimer", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Preferences are settings that can be modified to change the behavior of the subscription. For example, modify the limit preference to only receive notifications 10 times instead of 1 during a billing cycle.
|
||||
//
|
||||
// NOTE: Some preferences have certain restrictions on values that can be set.
|
||||
type Notification_User_Subscriber_Preference struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetNotificationUserSubscriberPreferenceService returns an instance of the Notification_User_Subscriber_Preference SoftLayer service
|
||||
func GetNotificationUserSubscriberPreferenceService(sess *session.Session) Notification_User_Subscriber_Preference {
|
||||
return Notification_User_Subscriber_Preference{Session: sess}
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Preference) Id(id int) Notification_User_Subscriber_Preference {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Preference) Mask(mask string) Notification_User_Subscriber_Preference {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Preference) Filter(filter string) Notification_User_Subscriber_Preference {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Preference) Limit(limit int) Notification_User_Subscriber_Preference {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Notification_User_Subscriber_Preference) Offset(offset int) Notification_User_Subscriber_Preference {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Use the method to create a new notification preference for a subscriber
|
||||
func (r Notification_User_Subscriber_Preference) CreateObject(templateObject *datatypes.Notification_User_Subscriber_Preference) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Preference", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Preference) EditObjects(templateObjects []datatypes.Notification_User_Subscriber_Preference) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Preference", "editObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Details such name, keyname, minimum and maximum values for the preference.
|
||||
func (r Notification_User_Subscriber_Preference) GetDefaultPreference() (resp datatypes.Notification_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Preference", "getDefaultPreference", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Details of the subscriber tied to the preference.
|
||||
func (r Notification_User_Subscriber_Preference) GetNotificationUserSubscriber() (resp datatypes.Notification_User_Subscriber, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Preference", "getNotificationUserSubscriber", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Notification_User_Subscriber_Preference) GetObject() (resp datatypes.Notification_User_Subscriber_Preference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Notification_User_Subscriber_Preference", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
2028
vendor/github.com/softlayer/softlayer-go/services/product.go
generated
vendored
Normal file
2028
vendor/github.com/softlayer/softlayer-go/services/product.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
564
vendor/github.com/softlayer/softlayer-go/services/provisioning.go
generated
vendored
Normal file
564
vendor/github.com/softlayer/softlayer-go/services/provisioning.go
generated
vendored
Normal file
|
@ -0,0 +1,564 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Provisioning_Hook contains all the information needed to add a hook into a server/Virtual provision and os reload.
|
||||
type Provisioning_Hook struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningHookService returns an instance of the Provisioning_Hook SoftLayer service
|
||||
func GetProvisioningHookService(sess *session.Session) Provisioning_Hook {
|
||||
return Provisioning_Hook{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook) Id(id int) Provisioning_Hook {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook) Mask(mask string) Provisioning_Hook {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook) Filter(filter string) Provisioning_Hook {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook) Limit(limit int) Provisioning_Hook {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook) Offset(offset int) Provisioning_Hook {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook) CreateObject(templateObject *datatypes.Provisioning_Hook) (resp datatypes.Provisioning_Hook, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook) EditObject(templateObject *datatypes.Provisioning_Hook) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Hook) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Hook) GetHookType() (resp datatypes.Provisioning_Hook_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "getHookType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook) GetObject() (resp datatypes.Provisioning_Hook, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Hook_Type struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningHookTypeService returns an instance of the Provisioning_Hook_Type SoftLayer service
|
||||
func GetProvisioningHookTypeService(sess *session.Session) Provisioning_Hook_Type {
|
||||
return Provisioning_Hook_Type{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook_Type) Id(id int) Provisioning_Hook_Type {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook_Type) Mask(mask string) Provisioning_Hook_Type {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook_Type) Filter(filter string) Provisioning_Hook_Type {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook_Type) Limit(limit int) Provisioning_Hook_Type {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Hook_Type) Offset(offset int) Provisioning_Hook_Type {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook_Type) GetAllHookTypes() (resp []datatypes.Provisioning_Hook_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getAllHookTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Hook_Type) GetObject() (resp datatypes.Provisioning_Hook_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Hook_Type", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Classification represent a maintenance type for the specific hardware maintenance desired.
|
||||
type Provisioning_Maintenance_Classification struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningMaintenanceClassificationService returns an instance of the Provisioning_Maintenance_Classification SoftLayer service
|
||||
func GetProvisioningMaintenanceClassificationService(sess *session.Session) Provisioning_Maintenance_Classification {
|
||||
return Provisioning_Maintenance_Classification{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification) Id(id int) Provisioning_Maintenance_Classification {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification) Mask(mask string) Provisioning_Maintenance_Classification {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification) Filter(filter string) Provisioning_Maintenance_Classification {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification) Limit(limit int) Provisioning_Maintenance_Classification {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification) Offset(offset int) Provisioning_Maintenance_Classification {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Maintenance_Classification) GetItemCategories() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getItemCategories", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications.
|
||||
func (r Provisioning_Maintenance_Classification) GetMaintenanceClassification(maintenanceClassificationId *int) (resp []datatypes.Provisioning_Maintenance_Classification, err error) {
|
||||
params := []interface{}{
|
||||
maintenanceClassificationId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassification", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve an array of SoftLayer_Provisioning_Maintenance_Classification data types, which contain all maintenance classifications.
|
||||
func (r Provisioning_Maintenance_Classification) GetMaintenanceClassificationsByItemCategory() (resp []datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getMaintenanceClassificationsByItemCategory", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Maintenance_Classification) GetObject() (resp datatypes.Provisioning_Maintenance_Classification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Maintenance_Classification_Item_Category struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningMaintenanceClassificationItemCategoryService returns an instance of the Provisioning_Maintenance_Classification_Item_Category SoftLayer service
|
||||
func GetProvisioningMaintenanceClassificationItemCategoryService(sess *session.Session) Provisioning_Maintenance_Classification_Item_Category {
|
||||
return Provisioning_Maintenance_Classification_Item_Category{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) Id(id int) Provisioning_Maintenance_Classification_Item_Category {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) Mask(mask string) Provisioning_Maintenance_Classification_Item_Category {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) Filter(filter string) Provisioning_Maintenance_Classification_Item_Category {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) Limit(limit int) Provisioning_Maintenance_Classification_Item_Category {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) Offset(offset int) Provisioning_Maintenance_Classification_Item_Category {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) GetMaintenanceClassification() (resp datatypes.Provisioning_Maintenance_Classification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification_Item_Category", "getMaintenanceClassification", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Maintenance_Classification_Item_Category) GetObject() (resp datatypes.Provisioning_Maintenance_Classification_Item_Category, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Classification_Item_Category", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Slots represent the available slots for a given maintenance window at a SoftLayer data center.
|
||||
type Provisioning_Maintenance_Slots struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningMaintenanceSlotsService returns an instance of the Provisioning_Maintenance_Slots SoftLayer service
|
||||
func GetProvisioningMaintenanceSlotsService(sess *session.Session) Provisioning_Maintenance_Slots {
|
||||
return Provisioning_Maintenance_Slots{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Slots) Id(id int) Provisioning_Maintenance_Slots {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Slots) Mask(mask string) Provisioning_Maintenance_Slots {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Slots) Filter(filter string) Provisioning_Maintenance_Slots {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Slots) Limit(limit int) Provisioning_Maintenance_Slots {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Slots) Offset(offset int) Provisioning_Maintenance_Slots {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Maintenance_Slots) GetObject() (resp datatypes.Provisioning_Maintenance_Slots, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Slots", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Provisioning_Maintenance_Ticket struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningMaintenanceTicketService returns an instance of the Provisioning_Maintenance_Ticket SoftLayer service
|
||||
func GetProvisioningMaintenanceTicketService(sess *session.Session) Provisioning_Maintenance_Ticket {
|
||||
return Provisioning_Maintenance_Ticket{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Ticket) Id(id int) Provisioning_Maintenance_Ticket {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Ticket) Mask(mask string) Provisioning_Maintenance_Ticket {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Ticket) Filter(filter string) Provisioning_Maintenance_Ticket {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Ticket) Limit(limit int) Provisioning_Maintenance_Ticket {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Ticket) Offset(offset int) Provisioning_Maintenance_Ticket {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Maintenance_Ticket) GetAvailableSlots() (resp datatypes.Provisioning_Maintenance_Slots, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Ticket", "getAvailableSlots", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Maintenance_Ticket) GetMaintenanceClass() (resp datatypes.Provisioning_Maintenance_Classification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Ticket", "getMaintenanceClass", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Maintenance_Ticket) GetObject() (resp datatypes.Provisioning_Maintenance_Ticket, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Ticket", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Provisioning_Maintenance_Ticket) GetTicket() (resp datatypes.Ticket, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Ticket", "getTicket", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Maintenance_Window represent a time window that SoftLayer performs a hardware or software maintenance and upgrades.
|
||||
type Provisioning_Maintenance_Window struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningMaintenanceWindowService returns an instance of the Provisioning_Maintenance_Window SoftLayer service
|
||||
func GetProvisioningMaintenanceWindowService(sess *session.Session) Provisioning_Maintenance_Window {
|
||||
return Provisioning_Maintenance_Window{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Window) Id(id int) Provisioning_Maintenance_Window {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Window) Mask(mask string) Provisioning_Maintenance_Window {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Window) Filter(filter string) Provisioning_Maintenance_Window {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Window) Limit(limit int) Provisioning_Maintenance_Window {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Maintenance_Window) Offset(offset int) Provisioning_Maintenance_Window {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// getMaintenceWindowForTicket() returns a boolean
|
||||
func (r Provisioning_Maintenance_Window) AddCustomerUpgradeWindow(customerUpgradeWindow *datatypes.Container_Provisioning_Maintenance_Window) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
customerUpgradeWindow,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "addCustomerUpgradeWindow", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getMaintenanceClassifications() returns an object of maintenance classifications
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenanceClassifications() (resp []datatypes.Provisioning_Maintenance_Classification, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceClassifications", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getMaintenanceStartEndTime() returns a specific maintenance window
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenanceStartEndTime(ticketId *int) (resp datatypes.Provisioning_Maintenance_Window, err error) {
|
||||
params := []interface{}{
|
||||
ticketId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceStartEndTime", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getMaintenceWindowForTicket() returns a specific maintenance window
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenanceWindowForTicket(maintenanceWindowId *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
|
||||
params := []interface{}{
|
||||
maintenanceWindowId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowForTicket", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getMaintenanceWindowTicketsByTicketId() returns a list maintenance window ticket records by ticket id
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenanceWindowTicketsByTicketId(ticketId *int) (resp []datatypes.Provisioning_Maintenance_Ticket, err error) {
|
||||
params := []interface{}{
|
||||
ticketId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindowTicketsByTicketId", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns a list of available maintenance windows
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
|
||||
params := []interface{}{
|
||||
beginDate,
|
||||
endDate,
|
||||
locationId,
|
||||
slotsNeeded,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// (DEPRECATED) Use [[SoftLayer_Provisioning_Maintenance_Window::getMaintenanceWindows|getMaintenanceWindows]] method.
|
||||
func (r Provisioning_Maintenance_Window) GetMaintenceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
|
||||
params := []interface{}{
|
||||
beginDate,
|
||||
endDate,
|
||||
locationId,
|
||||
slotsNeeded,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenceWindows", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getMaintenceWindowForTicket() returns a boolean
|
||||
func (r Provisioning_Maintenance_Window) UpdateCustomerUpgradeWindow(maintenanceStartTime *datatypes.Time, newMaintenanceWindowId *int, ticketId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
maintenanceStartTime,
|
||||
newMaintenanceWindowId,
|
||||
ticketId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "updateCustomerUpgradeWindow", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The SoftLayer_Provisioning_Version1_Transaction_Group data type contains general information relating to a single SoftLayer hardware transaction group.
|
||||
//
|
||||
// SoftLayer customers are unable to change their hardware transactions or the hardware transaction group.
|
||||
type Provisioning_Version1_Transaction_Group struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetProvisioningVersion1TransactionGroupService returns an instance of the Provisioning_Version1_Transaction_Group SoftLayer service
|
||||
func GetProvisioningVersion1TransactionGroupService(sess *session.Session) Provisioning_Version1_Transaction_Group {
|
||||
return Provisioning_Version1_Transaction_Group{Session: sess}
|
||||
}
|
||||
|
||||
func (r Provisioning_Version1_Transaction_Group) Id(id int) Provisioning_Version1_Transaction_Group {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Version1_Transaction_Group) Mask(mask string) Provisioning_Version1_Transaction_Group {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Version1_Transaction_Group) Filter(filter string) Provisioning_Version1_Transaction_Group {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Version1_Transaction_Group) Limit(limit int) Provisioning_Version1_Transaction_Group {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Provisioning_Version1_Transaction_Group) Offset(offset int) Provisioning_Version1_Transaction_Group {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Provisioning_Version1_Transaction_Group) GetAllObjects() (resp []datatypes.Provisioning_Version1_Transaction_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Provisioning_Version1_Transaction_Group object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Provisioning_Version1_Transaction_Group service.
|
||||
func (r Provisioning_Version1_Transaction_Group) GetObject() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Provisioning_Version1_Transaction_Group", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
419
vendor/github.com/softlayer/softlayer-go/services/resource.go
generated
vendored
Normal file
419
vendor/github.com/softlayer/softlayer-go/services/resource.go
generated
vendored
Normal file
|
@ -0,0 +1,419 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Configuration struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetResourceConfigurationService returns an instance of the Resource_Configuration SoftLayer service
|
||||
func GetResourceConfigurationService(sess *session.Session) Resource_Configuration {
|
||||
return Resource_Configuration{Session: sess}
|
||||
}
|
||||
|
||||
func (r Resource_Configuration) Id(id int) Resource_Configuration {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Configuration) Mask(mask string) Resource_Configuration {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Configuration) Filter(filter string) Resource_Configuration {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Configuration) Limit(limit int) Resource_Configuration {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Configuration) Offset(offset int) Resource_Configuration {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// The setOsPasswordFromEncrypted method is used to set the operating system password from a key/pair encrypted password signed by SoftLayer.
|
||||
func (r Resource_Configuration) SetOsPasswordFromEncrypted(encryptedPassword *string) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
encryptedPassword,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Configuration", "setOsPasswordFromEncrypted", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetResourceGroupService returns an instance of the Resource_Group SoftLayer service
|
||||
func GetResourceGroupService(sess *session.Session) Resource_Group {
|
||||
return Resource_Group{Session: sess}
|
||||
}
|
||||
|
||||
func (r Resource_Group) Id(id int) Resource_Group {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group) Mask(mask string) Resource_Group {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group) Filter(filter string) Resource_Group {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group) Limit(limit int) Resource_Group {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group) Offset(offset int) Resource_Group {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Resource_Group) EditObject(templateObject *datatypes.Resource_Group) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated group ancestors.
|
||||
func (r Resource_Group) GetAncestorGroups() (resp []datatypes.Resource_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAncestorGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated attributes.
|
||||
func (r Resource_Group) GetAttributes() (resp []datatypes.Resource_Group_Attribute, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getAttributes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated hardware members.
|
||||
func (r Resource_Group) GetHardwareMembers() (resp []datatypes.Resource_Group_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getHardwareMembers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated members.
|
||||
func (r Resource_Group) GetMembers() (resp []datatypes.Resource_Group_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getMembers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Resource_Group) GetObject() (resp datatypes.Resource_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated root resource group.
|
||||
func (r Resource_Group) GetRootResourceGroup() (resp datatypes.Resource_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getRootResourceGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated subnet members.
|
||||
func (r Resource_Group) GetSubnetMembers() (resp []datatypes.Resource_Group_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getSubnetMembers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated template.
|
||||
func (r Resource_Group) GetTemplate() (resp datatypes.Resource_Group_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getTemplate", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A resource group's associated VLAN members.
|
||||
func (r Resource_Group) GetVlanMembers() (resp []datatypes.Resource_Group_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group", "getVlanMembers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Group_Template struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetResourceGroupTemplateService returns an instance of the Resource_Group_Template SoftLayer service
|
||||
func GetResourceGroupTemplateService(sess *session.Session) Resource_Group_Template {
|
||||
return Resource_Group_Template{Session: sess}
|
||||
}
|
||||
|
||||
func (r Resource_Group_Template) Id(id int) Resource_Group_Template {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group_Template) Mask(mask string) Resource_Group_Template {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group_Template) Filter(filter string) Resource_Group_Template {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group_Template) Limit(limit int) Resource_Group_Template {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Group_Template) Offset(offset int) Resource_Group_Template {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Resource_Group_Template) GetAllObjects() (resp []datatypes.Resource_Group_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Resource_Group_Template) GetChildren() (resp []datatypes.Resource_Group_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getChildren", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Resource_Group_Template) GetMembers() (resp []datatypes.Resource_Group_Template_Member, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getMembers", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Resource_Group_Template) GetObject() (resp datatypes.Resource_Group_Template, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Resource_Group_Template) GetPackage() (resp datatypes.Product_Package, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Group_Template", "getPackage", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Resource_Metadata struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetResourceMetadataService returns an instance of the Resource_Metadata SoftLayer service
|
||||
func GetResourceMetadataService(sess *session.Session) Resource_Metadata {
|
||||
return Resource_Metadata{Session: sess}
|
||||
}
|
||||
|
||||
func (r Resource_Metadata) Id(id int) Resource_Metadata {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Metadata) Mask(mask string) Resource_Metadata {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Metadata) Filter(filter string) Resource_Metadata {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Metadata) Limit(limit int) Resource_Metadata {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Resource_Metadata) Offset(offset int) Resource_Metadata {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// The getBackendMacAddresses method retrieves a list of backend MAC addresses for the resource
|
||||
func (r Resource_Metadata) GetBackendMacAddresses() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getBackendMacAddresses", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getDatacenter method retrieves the name of the datacenter in which the resource is located.
|
||||
func (r Resource_Metadata) GetDatacenter() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getDatacenter", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getDatacenterId retrieves the ID for the datacenter in which the resource is located.
|
||||
func (r Resource_Metadata) GetDatacenterId() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getDatacenterId", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getDomain method retrieves the hostname for the resource.
|
||||
func (r Resource_Metadata) GetDomain() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getDomain", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getFrontendMacAddresses method retrieves a list of frontend MAC addresses for the resource
|
||||
func (r Resource_Metadata) GetFrontendMacAddresses() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFrontendMacAddresses", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getFullyQualifiedDomainName method provides the user with a combined return which includes the hostname and domain for the resource. Because this method returns multiple pieces of information, it avoids the need to use multiple methods to return the desired information.
|
||||
func (r Resource_Metadata) GetFullyQualifiedDomainName() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getFullyQualifiedDomainName", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getId getGlobalIdentifier retrieves the globalIdentifier for the resource
|
||||
func (r Resource_Metadata) GetGlobalIdentifier() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getGlobalIdentifier", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getHostname method retrieves the hostname for the resource.
|
||||
func (r Resource_Metadata) GetHostname() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getHostname", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getId method retrieves the ID for the resource
|
||||
func (r Resource_Metadata) GetId() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getId", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getPrimaryBackendIpAddress method retrieves the primary backend IP address for the resource
|
||||
func (r Resource_Metadata) GetPrimaryBackendIpAddress() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getPrimaryBackendIpAddress", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getPrimaryIpAddress method retrieves the primary IP address for the resource. For resources with a frontend network, the frontend IP address will be returned. For resources that have been provisioned with only a backend network, the backend IP address will be returned, as a frontend address will not exist.
|
||||
func (r Resource_Metadata) GetPrimaryIpAddress() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getPrimaryIpAddress", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getProvisionState method retrieves the provision state of the resource. The provision state may be used to determine when it is considered safe to perform additional setup operations. The method returns 'PROCESSING' to indicate the provision is in progress and 'COMPLETE' when the provision is complete.
|
||||
func (r Resource_Metadata) GetProvisionState() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getProvisionState", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getRouter method will return the router associated with a network component. When the router is redundant, the hostname of the redundant group will be returned, rather than the router hostname.
|
||||
func (r Resource_Metadata) GetRouter(macAddress *string) (resp string, err error) {
|
||||
params := []interface{}{
|
||||
macAddress,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getRouter", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getServiceResource method retrieves a specific service resource associated with the resource. Service resources are additional resources that may be used by this resource.
|
||||
func (r Resource_Metadata) GetServiceResource(serviceName *string, index *int) (resp string, err error) {
|
||||
params := []interface{}{
|
||||
serviceName,
|
||||
index,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResource", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getServiceResources method retrieves all service resources associated with the resource. Service resources are additional resources that may be used by this resource. The output format is <type>=<address> for each service resource.
|
||||
func (r Resource_Metadata) GetServiceResources() (resp []datatypes.Container_Resource_Metadata_ServiceResource, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResources", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getTags method retrieves all tags associated with the resource. Tags are single keywords assigned to a resource that assist the user in identifying the resource and its roles when performing a simple search. Tags are assigned by any user with access to the resource.
|
||||
func (r Resource_Metadata) GetTags() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getTags", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getUserMetadata method retrieves metadata completed by users who interact with the resource. Metadata gathered using this method is unique to parameters set using the '''setUserMetadata''' method, which must be executed prior to completing this method. User metadata may also be provided while placing an order for a resource.
|
||||
func (r Resource_Metadata) GetUserMetadata() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getUserMetadata", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getVlanIds method returns a list of VLAN IDs for the network component matching the provided MAC address associated with the resource. For each return, the native VLAN will appear first, followed by any trunked VLANs associated with the network component.
|
||||
func (r Resource_Metadata) GetVlanIds(macAddress *string) (resp []int, err error) {
|
||||
params := []interface{}{
|
||||
macAddress,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlanIds", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// The getVlans method returns a list of VLAN numbers for the network component matching the provided MAC address associated with the resource. For each return, the native VLAN will appear first, followed by any trunked VLANs associated with the network component.
|
||||
func (r Resource_Metadata) GetVlans(macAddress *string) (resp []int, err error) {
|
||||
params := []interface{}{
|
||||
macAddress,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getVlans", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
112
vendor/github.com/softlayer/softlayer-go/services/sales.go
generated
vendored
Normal file
112
vendor/github.com/softlayer/softlayer-go/services/sales.go
generated
vendored
Normal file
|
@ -0,0 +1,112 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The presale event data types indicate the information regarding an individual presale event. The '''locationId''' will indicate the datacenter associated with the presale event. The '''itemId''' will indicate the product item associated with a particular presale event - however these are more rare. The '''startDate''' and '''endDate''' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned.
|
||||
type Sales_Presale_Event struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSalesPresaleEventService returns an instance of the Sales_Presale_Event SoftLayer service
|
||||
func GetSalesPresaleEventService(sess *session.Session) Sales_Presale_Event {
|
||||
return Sales_Presale_Event{Session: sess}
|
||||
}
|
||||
|
||||
func (r Sales_Presale_Event) Id(id int) Sales_Presale_Event {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Sales_Presale_Event) Mask(mask string) Sales_Presale_Event {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Sales_Presale_Event) Filter(filter string) Sales_Presale_Event {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Sales_Presale_Event) Limit(limit int) Sales_Presale_Event {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Sales_Presale_Event) Offset(offset int) Sales_Presale_Event {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve A flag to indicate that the presale event is currently active. A presale event is active if the current time is between the start and end dates.
|
||||
func (r Sales_Presale_Event) GetActiveFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getActiveFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Sales_Presale_Event) GetAllObjects() (resp []datatypes.Sales_Presale_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date.
|
||||
func (r Sales_Presale_Event) GetExpiredFlag() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getExpiredFlag", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The [[SoftLayer_Product_Item]] associated with the presale event.
|
||||
func (r Sales_Presale_Event) GetItem() (resp datatypes.Product_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The [[SoftLayer_Location]] associated with the presale event.
|
||||
func (r Sales_Presale_Event) GetLocation() (resp datatypes.Location, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getLocation", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// '''getObject''' retrieves the [[SoftLayer_Sales_Presale_Event]] object whose id number corresponds to the id number of the init parameter passed to the SoftLayer_Sales_Presale_Event service. Customers may only retrieve presale events that are currently active.
|
||||
func (r Sales_Presale_Event) GetObject() (resp datatypes.Sales_Presale_Event, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
|
||||
func (r Sales_Presale_Event) GetOrders() (resp []datatypes.Billing_Order, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getOrders", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
1664
vendor/github.com/softlayer/softlayer-go/services/scale.go
generated
vendored
Normal file
1664
vendor/github.com/softlayer/softlayer-go/services/scale.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
122
vendor/github.com/softlayer/softlayer-go/services/search.go
generated
vendored
Normal file
122
vendor/github.com/softlayer/softlayer-go/services/search.go
generated
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Search struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSearchService returns an instance of the Search SoftLayer service
|
||||
func GetSearchService(sess *session.Session) Search {
|
||||
return Search{Session: sess}
|
||||
}
|
||||
|
||||
func (r Search) Id(id int) Search {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Search) Mask(mask string) Search {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Search) Filter(filter string) Search {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Search) Limit(limit int) Search {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Search) Offset(offset int) Search {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This method allows for searching for SoftLayer resources by simple terms and operators. Fields that are used for searching will be available at sldn.softlayer.com. It returns a collection or array of <b>[[SoftLayer_Container_Search_Result (type)|SoftLayer_Container_Search_Result]]</b> objects that have search metadata for each result and the resulting resource found.
|
||||
//
|
||||
// The advancedSearch() method recognizes the special <b><code>_objectType:</code></b> quantifier in search strings. See the documentation for the <b>[[SoftLayer_Search/search|search()]]</b> method on how to restrict searches using object types.
|
||||
//
|
||||
// The advancedSearch() method recognizes <b>[[SoftLayer_Container_Search_ObjectType_Property (type)|object properties]]</b>, which can also be used to limit searches. Example:
|
||||
//
|
||||
// <code>_objectType:Type_1 propertyA:</code><i><code>value</code></i>
|
||||
//
|
||||
// A search string can specify multiple properties, separated with spaces. Example:
|
||||
//
|
||||
// <code>_objectType:Type_1 propertyA:</code><i><code>value</code></i> <code>propertyB:</code><i><code>value</code></i>
|
||||
//
|
||||
// A collection of available object types and their properties can be retrieved by calling the <b>[[SoftLayer_Search/getObjectTypes|getObjectTypes()]]</b> method.
|
||||
func (r Search) AdvancedSearch(searchString *string) (resp []datatypes.Container_Search_Result, err error) {
|
||||
params := []interface{}{
|
||||
searchString,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Search", "advancedSearch", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method returns a collection of <b>[[SoftLayer_Container_Search_ObjectType (type)|SoftLayer_Container_Search_ObjectType]]</b> containers that specify which indexed object types and properties are exposed for the current user. These object types can be used to discover searchable data and to create or validate object index search strings.
|
||||
//
|
||||
// <p> Refer to the <b>[[SoftLayer_Search/search|search()]]</b> and <b>[[SoftLayer_Search/advancedSearch|advancedSearch()]]</b> methods for information on using object types and properties in search strings.
|
||||
func (r Search) GetObjectTypes() (resp []datatypes.Container_Search_ObjectType, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This method allows for searching for SoftLayer resources by simple phrase. It returns a collection or array of <b>[[SoftLayer_Container_Search_Result (type)|SoftLayer_Container_Search_Result]]</b> objects that have search metadata for each result and the resulting resource found.
|
||||
//
|
||||
// This method recognizes the special <b><code>_objectType:</code></b> quantifier in search strings. This quantifier can be used to restrict a search to specific object types. Example usage:
|
||||
//
|
||||
// <code>_objectType:Type_1 </code><i><code>(other search terms...)</code></i>
|
||||
//
|
||||
// A search string can specify multiple object types, separated by commas (no spaces are permitted between the type names). Example:
|
||||
//
|
||||
// <code>_objectType:Type_1,Type_2,Type_3 </code><i><code>(other search terms...)</code></i>
|
||||
//
|
||||
// If the list of object types is prefixed with a hyphen or minus sign (-), then the specified types are excluded from the search. Example:
|
||||
//
|
||||
// <code>_objectType:-Type_4,Type_5 </code><i><code>(other search terms...)</code></i>
|
||||
//
|
||||
// A collection of available object types can be retrieved by calling the <b>[[SoftLayer_Search/getObjectTypes|getObjectTypes()]]</b> method.
|
||||
func (r Search) Search(searchString *string) (resp []datatypes.Container_Search_Result, err error) {
|
||||
params := []interface{}{
|
||||
searchString,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Search", "search", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
456
vendor/github.com/softlayer/softlayer-go/services/security.go
generated
vendored
Normal file
456
vendor/github.com/softlayer/softlayer-go/services/security.go
generated
vendored
Normal file
|
@ -0,0 +1,456 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Security_Certificate struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSecurityCertificateService returns an instance of the Security_Certificate SoftLayer service
|
||||
func GetSecurityCertificateService(sess *session.Session) Security_Certificate {
|
||||
return Security_Certificate{Session: sess}
|
||||
}
|
||||
|
||||
func (r Security_Certificate) Id(id int) Security_Certificate {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate) Mask(mask string) Security_Certificate {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate) Filter(filter string) Security_Certificate {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate) Limit(limit int) Security_Certificate {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate) Offset(offset int) Security_Certificate {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Add a certificate to your account for your records, or for use with various services. Only the certificate and private key are usually required. If your issuer provided an intermediate certificate, you must also provide that certificate. Details will be extracted from the certificate. Validation will be performed between the certificate and the private key as well as the certificate and the intermediate certificate, if provided.
|
||||
//
|
||||
// The certificate signing request is not required, but can be provided for your records.
|
||||
func (r Security_Certificate) CreateObject(templateObject *datatypes.Security_Certificate) (resp datatypes.Security_Certificate, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Remove a certificate from your account. You may not remove a certificate with associated services.
|
||||
func (r Security_Certificate) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Update a certificate. Modifications are restricted to the note and CSR if the are any services associated with the certificate. There are no modification restrictions for a certificate with no associated services.
|
||||
func (r Security_Certificate) EditObject(templateObject *datatypes.Security_Certificate) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Locate certificates by their common name, traditionally a domain name.
|
||||
func (r Security_Certificate) FindByCommonName(commonName *string) (resp []datatypes.Security_Certificate, err error) {
|
||||
params := []interface{}{
|
||||
commonName,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "findByCommonName", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The number of services currently associated with the certificate.
|
||||
func (r Security_Certificate) GetAssociatedServiceCount() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getAssociatedServiceCount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The load balancers virtual IP addresses currently associated with the certificate.
|
||||
func (r Security_Certificate) GetLoadBalancerVirtualIpAddresses() (resp []datatypes.Network_Application_Delivery_Controller_LoadBalancer_VirtualIpAddress, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getLoadBalancerVirtualIpAddresses", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Security_Certificate) GetObject() (resp datatypes.Security_Certificate, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve the certificate in PEM (Privacy Enhanced Mail) format, which is a string containing all base64 encoded (DER) certificates delimited by -----BEGIN/END *----- clauses.
|
||||
func (r Security_Certificate) GetPemFormat() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate", "getPemFormat", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Security_Certificate_Request data type is used to harness your SSL certificate order to a Certificate Authority. This contains data that is required by a Certificate Authority to place an SSL certificate order.
|
||||
type Security_Certificate_Request struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSecurityCertificateRequestService returns an instance of the Security_Certificate_Request SoftLayer service
|
||||
func GetSecurityCertificateRequestService(sess *session.Session) Security_Certificate_Request {
|
||||
return Security_Certificate_Request{Session: sess}
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request) Id(id int) Security_Certificate_Request {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request) Mask(mask string) Security_Certificate_Request {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request) Filter(filter string) Security_Certificate_Request {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request) Limit(limit int) Security_Certificate_Request {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request) Offset(offset int) Security_Certificate_Request {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Cancels a pending SSL certificate order at the Certificate Authority
|
||||
func (r Security_Certificate_Request) CancelSslOrder() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "cancelSslOrder", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The account to which a SSL certificate request belongs.
|
||||
func (r Security_Certificate_Request) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Gets the email domains that can be used to validate a certificate to a domain.
|
||||
func (r Security_Certificate_Request) GetAdministratorEmailDomains(commonName *string) (resp []string, err error) {
|
||||
params := []interface{}{
|
||||
commonName,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailDomains", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Gets the email accounts that can be used to validate a certificate to a domain.
|
||||
func (r Security_Certificate_Request) GetAdministratorEmailPrefixes() (resp []string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getAdministratorEmailPrefixes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The Certificate Authority name
|
||||
func (r Security_Certificate_Request) GetCertificateAuthorityName() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getCertificateAuthorityName", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Security_Certificate_Request) GetObject() (resp datatypes.Security_Certificate_Request, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The order contains the information related to a SSL certificate request.
|
||||
func (r Security_Certificate_Request) GetOrder() (resp datatypes.Billing_Order, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getOrder", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The associated order item for this SSL certificate request.
|
||||
func (r Security_Certificate_Request) GetOrderItem() (resp datatypes.Billing_Order_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getOrderItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns previous SSL certificate order data. You can use this data for to place a renewal order for a completed SSL certificate.
|
||||
func (r Security_Certificate_Request) GetPreviousOrderData() (resp datatypes.Container_Product_Order_Security_Certificate, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getPreviousOrderData", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns all the SSL certificate requests.
|
||||
func (r Security_Certificate_Request) GetSslCertificateRequests(accountId *int) (resp []datatypes.Security_Certificate_Request, err error) {
|
||||
params := []interface{}{
|
||||
accountId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getSslCertificateRequests", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The status of a SSL certificate request.
|
||||
func (r Security_Certificate_Request) GetStatus() (resp datatypes.Security_Certificate_Request_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A Certificate Authority sends out various emails to your domain administrator or your technical contact. Use this service to have these emails re-sent.
|
||||
func (r Security_Certificate_Request) ResendEmail(emailType *string) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
emailType,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "resendEmail", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Allows you to validate a Certificate Signing Request (CSR) required for an SSL certificate with the certificate authority (CA). This method sends the CSR, the length of the subscription in months, the certificate type, and the server type for validation against requirements of the CA. Returns true if valid.
|
||||
//
|
||||
// More information on CSR generation can be found at: [http://en.wikipedia.org/wiki/Certificate_signing_request Wikipedia] [https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=AR235&actp=LIST&viewlocale=en_US VeriSign]
|
||||
func (r Security_Certificate_Request) ValidateCsr(csr *string, validityMonths *int, itemId *int, serverType *string) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
csr,
|
||||
validityMonths,
|
||||
itemId,
|
||||
serverType,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "validateCsr", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Represents a server type that can be specified when ordering an SSL certificate.
|
||||
type Security_Certificate_Request_ServerType struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSecurityCertificateRequestServerTypeService returns an instance of the Security_Certificate_Request_ServerType SoftLayer service
|
||||
func GetSecurityCertificateRequestServerTypeService(sess *session.Session) Security_Certificate_Request_ServerType {
|
||||
return Security_Certificate_Request_ServerType{Session: sess}
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_ServerType) Id(id int) Security_Certificate_Request_ServerType {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_ServerType) Mask(mask string) Security_Certificate_Request_ServerType {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_ServerType) Filter(filter string) Security_Certificate_Request_ServerType {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_ServerType) Limit(limit int) Security_Certificate_Request_ServerType {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_ServerType) Offset(offset int) Security_Certificate_Request_ServerType {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Returns all SSL certificate server types, which are passed in on a [[SoftLayer_Container_Product_Order_Security_Certificate|certificate order]].
|
||||
func (r Security_Certificate_Request_ServerType) GetAllObjects() (resp []datatypes.Security_Certificate_Request_ServerType, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Security_Certificate_Request_ServerType) GetObject() (resp datatypes.Security_Certificate_Request_ServerType, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_ServerType", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Represents the status of an SSL certificate request.
|
||||
type Security_Certificate_Request_Status struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSecurityCertificateRequestStatusService returns an instance of the Security_Certificate_Request_Status SoftLayer service
|
||||
func GetSecurityCertificateRequestStatusService(sess *session.Session) Security_Certificate_Request_Status {
|
||||
return Security_Certificate_Request_Status{Session: sess}
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_Status) Id(id int) Security_Certificate_Request_Status {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_Status) Mask(mask string) Security_Certificate_Request_Status {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_Status) Filter(filter string) Security_Certificate_Request_Status {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_Status) Limit(limit int) Security_Certificate_Request_Status {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Certificate_Request_Status) Offset(offset int) Security_Certificate_Request_Status {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Security_Certificate_Request_Status) GetObject() (resp datatypes.Security_Certificate_Request_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns all SSL certificate request status objects
|
||||
func (r Security_Certificate_Request_Status) GetSslRequestStatuses() (resp []datatypes.Security_Certificate_Request_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request_Status", "getSslRequestStatuses", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
type Security_Ssh_Key struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSecuritySshKeyService returns an instance of the Security_Ssh_Key SoftLayer service
|
||||
func GetSecuritySshKeyService(sess *session.Session) Security_Ssh_Key {
|
||||
return Security_Ssh_Key{Session: sess}
|
||||
}
|
||||
|
||||
func (r Security_Ssh_Key) Id(id int) Security_Ssh_Key {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Ssh_Key) Mask(mask string) Security_Ssh_Key {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Ssh_Key) Filter(filter string) Security_Ssh_Key {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Ssh_Key) Limit(limit int) Security_Ssh_Key {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Security_Ssh_Key) Offset(offset int) Security_Ssh_Key {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Add a ssh key to your account for use during server provisioning and os reloads.
|
||||
func (r Security_Ssh_Key) CreateObject(templateObject *datatypes.Security_Ssh_Key) (resp datatypes.Security_Ssh_Key, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Remove a ssh key from your account.
|
||||
func (r Security_Ssh_Key) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Update a ssh key.
|
||||
func (r Security_Ssh_Key) EditObject(templateObject *datatypes.Security_Ssh_Key) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Security_Ssh_Key) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The image template groups that are linked to an SSH key.
|
||||
func (r Security_Ssh_Key) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_Block_Device_Template_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getBlockDeviceTemplateGroups", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Security_Ssh_Key) GetObject() (resp datatypes.Security_Ssh_Key, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The OS root users that are linked to an SSH key.
|
||||
func (r Security_Ssh_Key) GetSoftwarePasswords() (resp []datatypes.Software_Component_Password, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Security_Ssh_Key", "getSoftwarePasswords", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
797
vendor/github.com/softlayer/softlayer-go/services/software.go
generated
vendored
Normal file
797
vendor/github.com/softlayer/softlayer-go/services/software.go
generated
vendored
Normal file
|
@ -0,0 +1,797 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// SoftLayer_Software_AccountLicense is a class that represents software licenses that are tied only to a customer's account and not to any particular hardware, IP address, etc.
|
||||
type Software_AccountLicense struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareAccountLicenseService returns an instance of the Software_AccountLicense SoftLayer service
|
||||
func GetSoftwareAccountLicenseService(sess *session.Session) Software_AccountLicense {
|
||||
return Software_AccountLicense{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_AccountLicense) Id(id int) Software_AccountLicense {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_AccountLicense) Mask(mask string) Software_AccountLicense {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_AccountLicense) Filter(filter string) Software_AccountLicense {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_AccountLicense) Limit(limit int) Software_AccountLicense {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_AccountLicense) Offset(offset int) Software_AccountLicense {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The customer account this Account License belongs to.
|
||||
func (r Software_AccountLicense) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_AccountLicense) GetAllObjects() (resp []datatypes.Software_AccountLicense, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The billing item for a software account license.
|
||||
func (r Software_AccountLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_AccountLicense) GetObject() (resp datatypes.Software_AccountLicense, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The SoftLayer_Software_Description that this account license is for.
|
||||
func (r Software_AccountLicense) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_AccountLicense", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// A SoftLayer_Software_Component ties the installation of a specific piece of software onto a specific piece of hardware.
|
||||
//
|
||||
// SoftLayer_Software_Component works with SoftLayer_Software_License and SoftLayer_Software_Description to tie this all together.
|
||||
//
|
||||
// <ul> <li>SoftLayer_Software_Component is the installation of a specific piece of software onto a specific piece of hardware in accordance to a software license. <ul> <li>SoftLayer_Software_License dictates when and how a specific piece of software may be installed onto a piece of hardware. <ul> <li>SoftLayer_Software_Description describes a specific piece of software which can be installed onto hardware in accordance with it's license agreement. </li></ul></li></ul></li></ul>
|
||||
type Software_Component struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareComponentService returns an instance of the Software_Component SoftLayer service
|
||||
func GetSoftwareComponentService(sess *session.Session) Software_Component {
|
||||
return Software_Component{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_Component) Id(id int) Software_Component {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component) Mask(mask string) Software_Component {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component) Filter(filter string) Software_Component {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component) Limit(limit int) Software_Component {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component) Offset(offset int) Software_Component {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The average amount of time that a software component takes to install.
|
||||
func (r Software_Component) GetAverageInstallationDuration() (resp uint, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getAverageInstallationDuration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The billing item for a software component.
|
||||
func (r Software_Component) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The hardware this Software Component is installed upon.
|
||||
func (r Software_Component) GetHardware() (resp datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
|
||||
func (r Software_Component) GetLicenseFile() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getLicenseFile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Software_Component object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Software_Component service.
|
||||
//
|
||||
// The best way to get software components is through getSoftwareComponents from the Hardware service.
|
||||
func (r Software_Component) GetObject() (resp datatypes.Software_Component, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve History Records for Software Passwords.
|
||||
func (r Software_Component) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswordHistory", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Username/Password pairs used for access to this Software Installation.
|
||||
func (r Software_Component) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getPasswords", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The Software Description of this Software Component.
|
||||
func (r Software_Component) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The License this Software Component uses.
|
||||
func (r Software_Component) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getSoftwareLicense", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component) GetVendorSetUpConfiguration() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The virtual guest this software component is installed upon.
|
||||
func (r Software_Component) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component", "getVirtualGuest", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: An Anti-virus/spyware instance. Anti-virus/spyware installations have specific properties and methods such as SoftLayer_Software_Component_AntivirusSpyware::updateAntivirusSpywarePolicy. Defaults are initiated by this object.
|
||||
type Software_Component_AntivirusSpyware struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareComponentAntivirusSpywareService returns an instance of the Software_Component_AntivirusSpyware SoftLayer service
|
||||
func GetSoftwareComponentAntivirusSpywareService(sess *session.Session) Software_Component_AntivirusSpyware {
|
||||
return Software_Component_AntivirusSpyware{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_Component_AntivirusSpyware) Id(id int) Software_Component_AntivirusSpyware {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_AntivirusSpyware) Mask(mask string) Software_Component_AntivirusSpyware {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_AntivirusSpyware) Filter(filter string) Software_Component_AntivirusSpyware {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_AntivirusSpyware) Limit(limit int) Software_Component_AntivirusSpyware {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_AntivirusSpyware) Offset(offset int) Software_Component_AntivirusSpyware {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The average amount of time that a software component takes to install.
|
||||
func (r Software_Component_AntivirusSpyware) GetAverageInstallationDuration() (resp uint, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getAverageInstallationDuration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The billing item for a software component.
|
||||
func (r Software_Component_AntivirusSpyware) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The hardware this Software Component is installed upon.
|
||||
func (r Software_Component_AntivirusSpyware) GetHardware() (resp datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
|
||||
func (r Software_Component_AntivirusSpyware) GetLicenseFile() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getLicenseFile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component_AntivirusSpyware) GetObject() (resp datatypes.Software_Component_AntivirusSpyware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve History Records for Software Passwords.
|
||||
func (r Software_Component_AntivirusSpyware) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswordHistory", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Username/Password pairs used for access to this Software Installation.
|
||||
func (r Software_Component_AntivirusSpyware) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getPasswords", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The Software Description of this Software Component.
|
||||
func (r Software_Component_AntivirusSpyware) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The License this Software Component uses.
|
||||
func (r Software_Component_AntivirusSpyware) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getSoftwareLicense", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component_AntivirusSpyware) GetVendorSetUpConfiguration() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The virtual guest this software component is installed upon.
|
||||
func (r Software_Component_AntivirusSpyware) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "getVirtualGuest", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Update an anti-virus/spyware policy. The policy options that it accepts are the following:
|
||||
// *1 - Minimal
|
||||
// *2 - Relaxed
|
||||
// *3 - Default
|
||||
// *4 - High
|
||||
// *5 - Ultimate
|
||||
func (r Software_Component_AntivirusSpyware) UpdateAntivirusSpywarePolicy(newPolicy *string, enforce *bool) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
newPolicy,
|
||||
enforce,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_AntivirusSpyware", "updateAntivirusSpywarePolicy", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This object specifies a specific type of Software Component: A Host Intrusion Protection System instance.
|
||||
type Software_Component_HostIps struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareComponentHostIpsService returns an instance of the Software_Component_HostIps SoftLayer service
|
||||
func GetSoftwareComponentHostIpsService(sess *session.Session) Software_Component_HostIps {
|
||||
return Software_Component_HostIps{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_Component_HostIps) Id(id int) Software_Component_HostIps {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_HostIps) Mask(mask string) Software_Component_HostIps {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_HostIps) Filter(filter string) Software_Component_HostIps {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_HostIps) Limit(limit int) Software_Component_HostIps {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_HostIps) Offset(offset int) Software_Component_HostIps {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The average amount of time that a software component takes to install.
|
||||
func (r Software_Component_HostIps) GetAverageInstallationDuration() (resp uint, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getAverageInstallationDuration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The billing item for a software component.
|
||||
func (r Software_Component_HostIps) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Get the current Host IPS policies.
|
||||
func (r Software_Component_HostIps) GetCurrentHostIpsPolicies() (resp []datatypes.Container_Software_Component_HostIps_Policy, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getCurrentHostIpsPolicies", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The hardware this Software Component is installed upon.
|
||||
func (r Software_Component_HostIps) GetHardware() (resp datatypes.Hardware, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Attempt to retrieve the file associated with a software component. If the software component does not support downloading license files an exception will be thrown.
|
||||
func (r Software_Component_HostIps) GetLicenseFile() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getLicenseFile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component_HostIps) GetObject() (resp datatypes.Software_Component_HostIps, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve History Records for Software Passwords.
|
||||
func (r Software_Component_HostIps) GetPasswordHistory() (resp []datatypes.Software_Component_Password_History, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswordHistory", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Username/Password pairs used for access to this Software Installation.
|
||||
func (r Software_Component_HostIps) GetPasswords() (resp []datatypes.Software_Component_Password, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getPasswords", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The Software Description of this Software Component.
|
||||
func (r Software_Component_HostIps) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The License this Software Component uses.
|
||||
func (r Software_Component_HostIps) GetSoftwareLicense() (resp datatypes.Software_License, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getSoftwareLicense", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component_HostIps) GetVendorSetUpConfiguration() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getVendorSetUpConfiguration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The virtual guest this software component is installed upon.
|
||||
func (r Software_Component_HostIps) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "getVirtualGuest", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Update the Host IPS policies. To retrieve valid policy options you must use the provided relationships.
|
||||
func (r Software_Component_HostIps) UpdateHipsPolicies(newIpsMode *string, newIpsProtection *string, newFirewallMode *string, newFirewallRuleset *string, newApplicationMode *string, newApplicationRuleset *string, newEnforcementPolicy *string) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
newIpsMode,
|
||||
newIpsProtection,
|
||||
newFirewallMode,
|
||||
newFirewallRuleset,
|
||||
newApplicationMode,
|
||||
newApplicationRuleset,
|
||||
newEnforcementPolicy,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_HostIps", "updateHipsPolicies", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This SoftLayer_Software_Component_Password data type contains a password for a specific software component instance.
|
||||
type Software_Component_Password struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareComponentPasswordService returns an instance of the Software_Component_Password SoftLayer service
|
||||
func GetSoftwareComponentPasswordService(sess *session.Session) Software_Component_Password {
|
||||
return Software_Component_Password{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_Component_Password) Id(id int) Software_Component_Password {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_Password) Mask(mask string) Software_Component_Password {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_Password) Filter(filter string) Software_Component_Password {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_Password) Limit(limit int) Software_Component_Password {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Component_Password) Offset(offset int) Software_Component_Password {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Create a password for a software component.
|
||||
func (r Software_Component_Password) CreateObject(templateObject *datatypes.Software_Component_Password) (resp datatypes.Software_Component_Password, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "createObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Create more than one password for a software component.
|
||||
func (r Software_Component_Password) CreateObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "createObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete a password from a software component.
|
||||
func (r Software_Component_Password) DeleteObject() (resp bool, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "deleteObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete more than one passwords from a software component.
|
||||
func (r Software_Component_Password) DeleteObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "deleteObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit the properties of a software component password such as the username, password, port, and notes.
|
||||
func (r Software_Component_Password) EditObject(templateObject *datatypes.Software_Component_Password) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObject,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "editObject", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit more than one password from a software component.
|
||||
func (r Software_Component_Password) EditObjects(templateObjects []datatypes.Software_Component_Password) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
templateObjects,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "editObjects", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Component_Password) GetObject() (resp datatypes.Software_Component_Password, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The SoftLayer_Software_Component instance that this username/password pair is valid for.
|
||||
func (r Software_Component_Password) GetSoftware() (resp datatypes.Software_Component, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSoftware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve SSH keys to be installed on the server during provisioning or an OS reload.
|
||||
func (r Software_Component_Password) GetSshKeys() (resp []datatypes.Security_Ssh_Key, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Component_Password", "getSshKeys", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// This class holds a description for a specific installation of a Software Component.
|
||||
//
|
||||
// SoftLayer_Software_Licenses tie a Software Component (A specific installation on a piece of hardware) to it's description.
|
||||
//
|
||||
// The "Manufacturer" and "Name" properties of a SoftLayer_Software_Description are used by the framework to factory specific objects, objects that may have special methods for that specific piece of software, or objects that contain application specific data, such as default ports. For example, if you create a SoftLayer_Software_Component who's SoftLayer_Software_License points to the SoftLayer_Software_Description for "Swsoft" "Plesk", you'll actually get a SoftLayer_Software_Component_Swsoft_Plesk object.
|
||||
type Software_Description struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareDescriptionService returns an instance of the Software_Description SoftLayer service
|
||||
func GetSoftwareDescriptionService(sess *session.Session) Software_Description {
|
||||
return Software_Description{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_Description) Id(id int) Software_Description {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Description) Mask(mask string) Software_Description {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Description) Filter(filter string) Software_Description {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Description) Limit(limit int) Software_Description {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_Description) Offset(offset int) Software_Description {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Description) GetAllObjects() (resp []datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getAllObjects", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Software_Description) GetAttributes() (resp []datatypes.Software_Description_Attribute, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getAttributes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The average amount of time that a software description takes to install.
|
||||
func (r Software_Description) GetAverageInstallationDuration() (resp int, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getAverageInstallationDuration", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A list of the software descriptions that are compatible with this software description.
|
||||
func (r Software_Description) GetCompatibleSoftwareDescriptions() (resp []datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getCompatibleSoftwareDescriptions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Description) GetCustomerOwnedLicenseDescriptions() (resp []datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getCustomerOwnedLicenseDescriptions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The feature attributes of a software description.
|
||||
func (r Software_Description) GetFeatures() (resp []datatypes.Software_Description_Feature, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getFeatures", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The latest version of a software description.
|
||||
func (r Software_Description) GetLatestVersion() (resp []datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getLatestVersion", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Software_Description) GetObject() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The various product items to which this software description is linked.
|
||||
func (r Software_Description) GetProductItems() (resp []datatypes.Product_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getProductItems", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve This details the provisioning transaction group for this software. This is only valid for Operating System software.
|
||||
func (r Software_Description) GetProvisionTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getProvisionTransactionGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The transaction group that a software description belongs to. A transaction group is a sequence of transactions that must be performed in a specific order for the installation of software.
|
||||
func (r Software_Description) GetReloadTransactionGroup() (resp datatypes.Provisioning_Version1_Transaction_Group, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getReloadTransactionGroup", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The default user created for a given a software description.
|
||||
func (r Software_Description) GetRequiredUser() (resp string, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getRequiredUser", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve Software Licenses that govern this Software Description.
|
||||
func (r Software_Description) GetSoftwareLicenses() (resp []datatypes.Software_License, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getSoftwareLicenses", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A suggestion for an upgrade path from this Software Description
|
||||
func (r Software_Description) GetUpgradeSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve A suggestion for an upgrade path from this Software Description (Deprecated - Use upgradeSoftwareDescription)
|
||||
func (r Software_Description) GetUpgradeSwDesc() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getUpgradeSwDesc", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve
|
||||
func (r Software_Description) GetValidFilesystemTypes() (resp []datatypes.Configuration_Storage_Filesystem_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_Description", "getValidFilesystemTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed".
|
||||
type Software_VirtualLicense struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSoftwareVirtualLicenseService returns an instance of the Software_VirtualLicense SoftLayer service
|
||||
func GetSoftwareVirtualLicenseService(sess *session.Session) Software_VirtualLicense {
|
||||
return Software_VirtualLicense{Session: sess}
|
||||
}
|
||||
|
||||
func (r Software_VirtualLicense) Id(id int) Software_VirtualLicense {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_VirtualLicense) Mask(mask string) Software_VirtualLicense {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_VirtualLicense) Filter(filter string) Software_VirtualLicense {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_VirtualLicense) Limit(limit int) Software_VirtualLicense {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Software_VirtualLicense) Offset(offset int) Software_VirtualLicense {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Retrieve The customer account this Virtual License belongs to.
|
||||
func (r Software_VirtualLicense) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The billing item for a software virtual license.
|
||||
func (r Software_VirtualLicense) GetBillingItem() (resp datatypes.Billing_Item, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getBillingItem", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The hardware record to which the software virtual license is assigned.
|
||||
func (r Software_VirtualLicense) GetHostHardware() (resp datatypes.Hardware_Server, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getHostHardware", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The IP Address record associated with a virtual license.
|
||||
func (r Software_VirtualLicense) GetIpAddressRecord() (resp datatypes.Network_Subnet_IpAddress, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getIpAddressRecord", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Attempt to retrieve the file associated with a virtual license, if such a file exists. If there is no file for this virtual license, calling this method will either throw an exception or return false.
|
||||
func (r Software_VirtualLicense) GetLicenseFile() (resp []byte, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getLicenseFile", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Software_VirtualLicense object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Software_VirtualLicense service. You can only retrieve Virtual Licenses assigned to your account number.
|
||||
func (r Software_VirtualLicense) GetObject() (resp datatypes.Software_VirtualLicense, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The SoftLayer_Software_Description that this virtual license is for.
|
||||
func (r Software_VirtualLicense) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getSoftwareDescription", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The subnet this Virtual License's IP address belongs to.
|
||||
func (r Software_VirtualLicense) GetSubnet() (resp datatypes.Network_Subnet, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Software_VirtualLicense", "getSubnet", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
112
vendor/github.com/softlayer/softlayer-go/services/survey.go
generated
vendored
Normal file
112
vendor/github.com/softlayer/softlayer-go/services/survey.go
generated
vendored
Normal file
|
@ -0,0 +1,112 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Survey data type contains general information relating to a single SoftLayer survey.
|
||||
type Survey struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetSurveyService returns an instance of the Survey SoftLayer service
|
||||
func GetSurveyService(sess *session.Session) Survey {
|
||||
return Survey{Session: sess}
|
||||
}
|
||||
|
||||
func (r Survey) Id(id int) Survey {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Survey) Mask(mask string) Survey {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Survey) Filter(filter string) Survey {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Survey) Limit(limit int) Survey {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Survey) Offset(offset int) Survey {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// Provides survey details for the given type
|
||||
func (r Survey) GetActiveSurveyByType(typ *string) (resp datatypes.Survey, err error) {
|
||||
params := []interface{}{
|
||||
typ,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "getActiveSurveyByType", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// getObject retrieves the SoftLayer_Survey object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Survey service. You can only retrieve the survey that your portal user has taken.
|
||||
func (r Survey) GetObject() (resp datatypes.Survey, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The questions for a survey.
|
||||
func (r Survey) GetQuestions() (resp []datatypes.Survey_Question, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "getQuestions", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The status of the survey
|
||||
func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The type of survey
|
||||
func (r Survey) GetType() (resp datatypes.Survey_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "getType", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Response to a SoftLayer survey's questions.
|
||||
func (r Survey) TakeSurvey(responses []datatypes.Survey_Response) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
responses,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Survey", "takeSurvey", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
123
vendor/github.com/softlayer/softlayer-go/services/tag.go
generated
vendored
Normal file
123
vendor/github.com/softlayer/softlayer-go/services/tag.go
generated
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// The SoftLayer_Tag data type is an optional type associated with hardware. The account ID that the tag is tied to, and the tag itself are stored in this data type. There is also a flag to denote whether the tag is internal or not.
|
||||
type Tag struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetTagService returns an instance of the Tag SoftLayer service
|
||||
func GetTagService(sess *session.Session) Tag {
|
||||
return Tag{Session: sess}
|
||||
}
|
||||
|
||||
func (r Tag) Id(id int) Tag {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Tag) Mask(mask string) Tag {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Tag) Filter(filter string) Tag {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Tag) Limit(limit int) Tag {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Tag) Offset(offset int) Tag {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// This function is responsible for setting the Tags values. The internal flag is set to 0 if the user is a customer, and 1 otherwise. AccountId is set to the account bound to the user, and the tags name is set to the clean version of the tag inputted by the user.
|
||||
func (r Tag) AutoComplete(tag *string) (resp []datatypes.Tag, err error) {
|
||||
params := []interface{}{
|
||||
tag,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "autoComplete", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve The account to which the tag is tied.
|
||||
func (r Tag) GetAccount() (resp datatypes.Account, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "getAccount", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns all tags of a given object type.
|
||||
func (r Tag) GetAllTagTypes() (resp []datatypes.Tag_Type, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "getAllTagTypes", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// no documentation yet
|
||||
func (r Tag) GetObject() (resp datatypes.Tag, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "getObject", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Retrieve References that tie object to the tag.
|
||||
func (r Tag) GetReferences() (resp []datatypes.Tag_Reference, err error) {
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "getReferences", nil, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Returns the Tag object with a given name. The user types in the tag name and this method returns the tag with that name.
|
||||
func (r Tag) GetTagByTagName(tagList *string) (resp []datatypes.Tag, err error) {
|
||||
params := []interface{}{
|
||||
tagList,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "getTagByTagName", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Tag an object by passing in one or more tags separated by a comma. Tag references are cleared out every time this method is called. If your object is already tagged you will need to pass the current tags along with any new ones. To remove all tag references pass an empty string. To remove one or more tags omit them from the tag list. The characters permitted are A-Z, 0-9, whitespace, _ (underscore), - (hypen), . (period), and : (colon). All other characters will be stripped away.
|
||||
func (r Tag) SetTags(tags *string, keyName *string, resourceTableId *int) (resp bool, err error) {
|
||||
params := []interface{}{
|
||||
tags,
|
||||
keyName,
|
||||
resourceTableId,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Tag", "setTags", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
1024
vendor/github.com/softlayer/softlayer-go/services/ticket.go
generated
vendored
Normal file
1024
vendor/github.com/softlayer/softlayer-go/services/ticket.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
4396
vendor/github.com/softlayer/softlayer-go/services/user.go
generated
vendored
Normal file
4396
vendor/github.com/softlayer/softlayer-go/services/user.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
88
vendor/github.com/softlayer/softlayer-go/services/utility.go
generated
vendored
Normal file
88
vendor/github.com/softlayer/softlayer-go/services/utility.go
generated
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package services
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/session"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// no documentation yet
|
||||
type Utility_Network struct {
|
||||
Session *session.Session
|
||||
Options sl.Options
|
||||
}
|
||||
|
||||
// GetUtilityNetworkService returns an instance of the Utility_Network SoftLayer service
|
||||
func GetUtilityNetworkService(sess *session.Session) Utility_Network {
|
||||
return Utility_Network{Session: sess}
|
||||
}
|
||||
|
||||
func (r Utility_Network) Id(id int) Utility_Network {
|
||||
r.Options.Id = &id
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Utility_Network) Mask(mask string) Utility_Network {
|
||||
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
}
|
||||
|
||||
r.Options.Mask = mask
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Utility_Network) Filter(filter string) Utility_Network {
|
||||
r.Options.Filter = filter
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Utility_Network) Limit(limit int) Utility_Network {
|
||||
r.Options.Limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r Utility_Network) Offset(offset int) Utility_Network {
|
||||
r.Options.Offset = &offset
|
||||
return r
|
||||
}
|
||||
|
||||
// A method used to return the nameserver information for a given address
|
||||
func (r Utility_Network) NsLookup(address *string, typ *string) (resp string, err error) {
|
||||
params := []interface{}{
|
||||
address,
|
||||
typ,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Utility_Network", "nsLookup", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
||||
|
||||
// Perform a WHOIS lookup from SoftLayer's application servers on the given IP address or hostname and return the raw results of that command. The returned result is similar to the result received from running the command `whois` from a UNIX command shell. A WHOIS lookup queries a host's registrar to retrieve domain registrant information including registration date, expiry date, and the administrative, technical, billing, and abuse contacts responsible for a domain. WHOIS lookups are useful for determining a physical contact responsible for a particular domain. WHOIS lookups are also useful for determining domain availability. Running a WHOIS lookup on an IP address queries ARIN for that IP block's ownership, and is helpful for determining a physical entity responsible for a certain IP address.
|
||||
func (r Utility_Network) Whois(address *string) (resp string, err error) {
|
||||
params := []interface{}{
|
||||
address,
|
||||
}
|
||||
err = r.Session.DoRequest("SoftLayer_Utility_Network", "whois", params, &r.Options, &resp)
|
||||
return
|
||||
}
|
2957
vendor/github.com/softlayer/softlayer-go/services/virtual.go
generated
vendored
Normal file
2957
vendor/github.com/softlayer/softlayer-go/services/virtual.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
232
vendor/github.com/softlayer/softlayer-go/session/rest.go
generated
vendored
Normal file
232
vendor/github.com/softlayer/softlayer-go/session/rest.go
generated
vendored
Normal file
|
@ -0,0 +1,232 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package session
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
type RestTransport struct{}
|
||||
|
||||
// DoRequest - Implementation of the TransportHandler interface for handling
|
||||
// calls to the REST endpoint.
|
||||
func (r *RestTransport) DoRequest(sess *Session, service string, method string, args []interface{}, options *sl.Options, pResult interface{}) error {
|
||||
restMethod := httpMethod(method, args)
|
||||
|
||||
// Parse any method parameters and determine the HTTP method
|
||||
var parameters []byte
|
||||
if len(args) > 0 {
|
||||
// parse the parameters
|
||||
parameters, _ = json.Marshal(
|
||||
map[string]interface{}{
|
||||
"parameters": args,
|
||||
})
|
||||
}
|
||||
|
||||
path := buildPath(service, method, options)
|
||||
|
||||
resp, code, err := makeHTTPRequest(
|
||||
sess,
|
||||
path,
|
||||
restMethod,
|
||||
bytes.NewBuffer(parameters),
|
||||
options)
|
||||
|
||||
if err != nil {
|
||||
return sl.Error{Wrapped: err}
|
||||
}
|
||||
|
||||
if code < 200 || code > 299 {
|
||||
e := sl.Error{StatusCode: code}
|
||||
|
||||
err = json.Unmarshal(resp, &e)
|
||||
|
||||
// If unparseable, wrap the json error
|
||||
if err != nil {
|
||||
e.Wrapped = err
|
||||
e.Message = err.Error()
|
||||
}
|
||||
|
||||
return e
|
||||
}
|
||||
|
||||
// Some APIs that normally return a collection, omit the []'s when the API returns a single value
|
||||
returnType := reflect.TypeOf(pResult).String()
|
||||
if strings.Index(returnType, "[]") == 1 && strings.Index(string(resp), "[") != 0 {
|
||||
resp = []byte("[" + string(resp) + "]")
|
||||
}
|
||||
|
||||
// At this point, all that's left to do is parse the return value to the appropriate type, and return
|
||||
// any parse errors (or nil if successful)
|
||||
|
||||
err = nil
|
||||
switch pResult.(type) {
|
||||
case *[]uint8:
|
||||
// exclude quotes
|
||||
*pResult.(*[]uint8) = resp[1 : len(resp)-1]
|
||||
case *datatypes.Void:
|
||||
case *uint:
|
||||
var val uint64
|
||||
val, err = strconv.ParseUint(string(resp), 0, 64)
|
||||
if err == nil {
|
||||
*pResult.(*uint) = uint(val)
|
||||
}
|
||||
case *bool:
|
||||
*pResult.(*bool), err = strconv.ParseBool(string(resp))
|
||||
case *string:
|
||||
str := string(resp)
|
||||
strIdx := len(str) - 1
|
||||
if str == "null" {
|
||||
str = ""
|
||||
} else if str[0] == '"' && str[strIdx] == '"' {
|
||||
rawStr := rawString{str}
|
||||
err = json.Unmarshal([]byte(`{"val":`+str+`}`), &rawStr)
|
||||
if err == nil {
|
||||
str = rawStr.Val
|
||||
}
|
||||
}
|
||||
*pResult.(*string) = str
|
||||
default:
|
||||
// Must be a json representation of one of the many softlayer datatypes
|
||||
err = json.Unmarshal(resp, pResult)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
err = sl.Error{Message: err.Error(), Wrapped: err}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type rawString struct {
|
||||
Val string
|
||||
}
|
||||
|
||||
func buildPath(service string, method string, options *sl.Options) string {
|
||||
path := service
|
||||
|
||||
if options.Id != nil {
|
||||
path = path + "/" + strconv.Itoa(*options.Id)
|
||||
}
|
||||
|
||||
// omit the API method name if the method represents one of the basic REST methods
|
||||
if method != "getObject" && method != "deleteObject" && method != "createObject" &&
|
||||
method != "createObjects" && method != "editObject" && method != "editObjects" {
|
||||
path = path + "/" + method
|
||||
}
|
||||
|
||||
return path + ".json"
|
||||
}
|
||||
|
||||
func encodeQuery(opts *sl.Options) string {
|
||||
query := new(url.URL).Query()
|
||||
|
||||
if opts.Mask != "" {
|
||||
query.Add("objectMask", opts.Mask)
|
||||
}
|
||||
|
||||
if opts.Filter != "" {
|
||||
query.Add("objectFilter", opts.Filter)
|
||||
}
|
||||
|
||||
// resultLimit=<offset>,<limit>
|
||||
// If offset unspecified, default to 0
|
||||
if opts.Limit != nil {
|
||||
startOffset := 0
|
||||
if opts.Offset != nil {
|
||||
startOffset = *opts.Offset
|
||||
}
|
||||
|
||||
query.Add("resultLimit", fmt.Sprintf("%d,%d", startOffset, *opts.Limit))
|
||||
}
|
||||
|
||||
return query.Encode()
|
||||
}
|
||||
|
||||
func makeHTTPRequest(session *Session, path string, requestType string, requestBody *bytes.Buffer, options *sl.Options) ([]byte, int, error) {
|
||||
log := Logger
|
||||
client := http.DefaultClient
|
||||
client.Timeout = DefaultTimeout
|
||||
if session.Timeout != 0 {
|
||||
client.Timeout = session.Timeout
|
||||
}
|
||||
|
||||
var url string
|
||||
if session.Endpoint == "" {
|
||||
url = url + DefaultEndpoint
|
||||
} else {
|
||||
url = url + session.Endpoint
|
||||
}
|
||||
url = fmt.Sprintf("%s/%s", strings.TrimRight(url, "/"), path)
|
||||
req, err := http.NewRequest(requestType, url, requestBody)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
if session.APIKey != "" {
|
||||
req.SetBasicAuth(session.UserName, session.APIKey)
|
||||
} else if session.AuthToken != "" {
|
||||
req.SetBasicAuth(fmt.Sprintf("%d", session.UserId), session.AuthToken)
|
||||
}
|
||||
|
||||
req.URL.RawQuery = encodeQuery(options)
|
||||
|
||||
if session.Debug {
|
||||
log.Println("[DEBUG] Request URL: ", requestType, req.URL)
|
||||
log.Println("[DEBUG] Parameters: ", requestBody.String())
|
||||
}
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, 520, err
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
responseBody, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, resp.StatusCode, err
|
||||
}
|
||||
|
||||
if session.Debug {
|
||||
log.Println("[DEBUG] Response: ", string(responseBody))
|
||||
}
|
||||
return responseBody, resp.StatusCode, nil
|
||||
}
|
||||
|
||||
func httpMethod(name string, args []interface{}) string {
|
||||
if name == "deleteObject" {
|
||||
return "DELETE"
|
||||
} else if name == "editObject" || name == "editObjects" {
|
||||
return "PUT"
|
||||
} else if name == "createObject" || name == "createObjects" || len(args) > 0 {
|
||||
return "POST"
|
||||
}
|
||||
|
||||
return "GET"
|
||||
}
|
234
vendor/github.com/softlayer/softlayer-go/session/session.go
generated
vendored
Normal file
234
vendor/github.com/softlayer/softlayer-go/session/session.go
generated
vendored
Normal file
|
@ -0,0 +1,234 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package session
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"os/user"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/softlayer/softlayer-go/config"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Logger is the logger used by the SoftLayer session package. Can be overridden by the user.
|
||||
var Logger *log.Logger
|
||||
|
||||
func init() {
|
||||
// initialize the logger used by the session package.
|
||||
Logger = log.New(os.Stderr, "", log.LstdFlags)
|
||||
}
|
||||
|
||||
// DefaultEndpoint is the default endpoint for API calls, when no override
|
||||
// is provided.
|
||||
const DefaultEndpoint = "https://api.softlayer.com/rest/v3"
|
||||
|
||||
// TransportHandler
|
||||
type TransportHandler interface {
|
||||
// DoRequest is the protocol-specific handler for making API requests.
|
||||
//
|
||||
// sess is a reference to the current session object, where authentication and
|
||||
// endpoint information can be found.
|
||||
//
|
||||
// service and method are the SoftLayer service name and method name, exactly as they
|
||||
// are documented at http://sldn.softlayer.com/reference/softlayerapi (i.e., with the
|
||||
// 'SoftLayer_' prefix and properly cased.
|
||||
//
|
||||
// args is a slice of arguments required for the service method being invoked. The
|
||||
// types of each argument varies. See the method definition in the services package
|
||||
// for the expected type of each argument.
|
||||
//
|
||||
// options is an sl.Options struct, containing any mask, filter, or result limit values
|
||||
// to be applied.
|
||||
//
|
||||
// pResult is a pointer to a variable to be populated with the result of the API call.
|
||||
// DoRequest should ensure that the native API response (i.e., XML or JSON) is correctly
|
||||
// unmarshaled into the result structure.
|
||||
//
|
||||
// A sl.Error is returned, and can be (with a type assertion) inspected for details of
|
||||
// the error (http code, API error message, etc.), or simply handled as a generic error,
|
||||
// (in which case no type assertion would be necessary)
|
||||
DoRequest(
|
||||
sess *Session,
|
||||
service string,
|
||||
method string,
|
||||
args []interface{},
|
||||
options *sl.Options,
|
||||
pResult interface{}) error
|
||||
}
|
||||
|
||||
const DefaultTimeout = time.Second * 120
|
||||
|
||||
// Session stores the information required for communication with the SoftLayer
|
||||
// API
|
||||
type Session struct {
|
||||
// UserName is the name of the SoftLayer API user
|
||||
UserName string
|
||||
|
||||
// ApiKey is the secret for making API calls
|
||||
APIKey string
|
||||
|
||||
// Endpoint is the SoftLayer API endpoint to communicate with
|
||||
Endpoint string
|
||||
|
||||
// UserId is the user id for token-based authentication
|
||||
UserId int
|
||||
|
||||
// AuthToken is the token secret for token-based authentication
|
||||
AuthToken string
|
||||
|
||||
// Debug controls logging of request details (URI, parameters, etc.)
|
||||
Debug bool
|
||||
|
||||
// The handler whose DoRequest() function will be called for each API request.
|
||||
// Handles the request and any response parsing specific to the desired protocol
|
||||
// (e.g., REST). Set automatically for a new Session, based on the
|
||||
// provided Endpoint.
|
||||
TransportHandler TransportHandler
|
||||
|
||||
// Timeout specifies a time limit for http requests made by this
|
||||
// session. Requests that take longer that the specified timeout
|
||||
// will result in an error.
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
// New creates and returns a pointer to a new session object. It takes up to
|
||||
// three parameters, all of which are optional. If specified, they will be
|
||||
// interpreted in the following sequence:
|
||||
//
|
||||
// 1. UserName
|
||||
// 2. Api Key
|
||||
// 3. Endpoint
|
||||
// 4. Timeout
|
||||
//
|
||||
// If one or more are omitted, New() will attempt to retrieve these values from
|
||||
// the environment, and the ~/.softlayer config file, in that order.
|
||||
func New(args ...interface{}) *Session {
|
||||
keys := map[string]int{"username": 0, "api_key": 1, "endpoint_url": 2, "timeout": 3}
|
||||
values := []string{"", "", "", ""}
|
||||
|
||||
for i := 0; i < len(args); i++ {
|
||||
values[i] = args[i].(string)
|
||||
}
|
||||
|
||||
// Default to the environment variables
|
||||
|
||||
// Prioritize SL_USERNAME
|
||||
envFallback("SL_USERNAME", &values[keys["username"]])
|
||||
envFallback("SOFTLAYER_USERNAME", &values[keys["username"]])
|
||||
|
||||
// Prioritize SL_API_KEY
|
||||
envFallback("SL_API_KEY", &values[keys["api_key"]])
|
||||
envFallback("SOFTLAYER_API_KEY", &values[keys["api_key"]])
|
||||
|
||||
// Prioritize SL_ENDPOINT_URL
|
||||
envFallback("SL_ENDPOINT_URL", &values[keys["endpoint_url"]])
|
||||
envFallback("SOFTLAYER_ENDPOINT_URL", &values[keys["endpoint_url"]])
|
||||
|
||||
envFallback("SL_TIMEOUT", &values[keys["timeout"]])
|
||||
envFallback("SOFTLAYER_TIMEOUT", &values[keys["timeout"]])
|
||||
|
||||
// Read ~/.softlayer for configuration
|
||||
var homeDir string
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
for _, name := range []string{"HOME", "USERPROFILE"} { // *nix, windows
|
||||
if dir := os.Getenv(name); dir != "" {
|
||||
homeDir = dir
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
homeDir = u.HomeDir
|
||||
}
|
||||
|
||||
if homeDir != "" {
|
||||
configPath := fmt.Sprintf("%s/.softlayer", homeDir)
|
||||
if _, err = os.Stat(configPath); !os.IsNotExist(err) {
|
||||
// config file exists
|
||||
file, err := config.LoadFile(configPath)
|
||||
if err != nil {
|
||||
log.Println(fmt.Sprintf("[WARN] session: Could not parse %s : %s", configPath, err))
|
||||
} else {
|
||||
for k, v := range keys {
|
||||
value, ok := file.Get("softlayer", k)
|
||||
if ok && values[v] == "" {
|
||||
values[v] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.Println("[WARN] session: home dir could not be determined. Skipping read of ~/.softlayer.")
|
||||
}
|
||||
|
||||
endpointURL := values[keys["endpoint_url"]]
|
||||
if endpointURL == "" {
|
||||
endpointURL = DefaultEndpoint
|
||||
}
|
||||
|
||||
sess := &Session{
|
||||
UserName: values[keys["username"]],
|
||||
APIKey: values[keys["api_key"]],
|
||||
Endpoint: endpointURL,
|
||||
}
|
||||
|
||||
timeout := values[keys["timeout"]]
|
||||
if timeout != "" {
|
||||
timeoutDuration, err := time.ParseDuration(fmt.Sprintf("%ss", timeout))
|
||||
if err == nil {
|
||||
sess.Timeout = timeoutDuration
|
||||
}
|
||||
}
|
||||
|
||||
return sess
|
||||
}
|
||||
|
||||
// DoRequest hands off the processing to the assigned transport handler. It is
|
||||
// normally called internally by the service objects, but is exported so that it can
|
||||
// be invoked directly by client code in exceptional cases where direct control is
|
||||
// needed over one of the parameters.
|
||||
//
|
||||
// For a description of parameters, see TransportHandler.DoRequest in this package
|
||||
func (r *Session) DoRequest(service string, method string, args []interface{}, options *sl.Options, pResult interface{}) error {
|
||||
if r.TransportHandler == nil {
|
||||
r.TransportHandler = getDefaultTransport(r.Endpoint)
|
||||
}
|
||||
|
||||
return r.TransportHandler.DoRequest(r, service, method, args, options, pResult)
|
||||
}
|
||||
|
||||
func envFallback(keyName string, value *string) {
|
||||
if *value == "" {
|
||||
*value = os.Getenv(keyName)
|
||||
}
|
||||
}
|
||||
|
||||
func getDefaultTransport(endpointURL string) TransportHandler {
|
||||
var transportHandler TransportHandler
|
||||
|
||||
if strings.Contains(endpointURL, "/xmlrpc/") {
|
||||
transportHandler = &XmlRpcTransport{}
|
||||
} else {
|
||||
transportHandler = &RestTransport{}
|
||||
}
|
||||
|
||||
return transportHandler
|
||||
}
|
195
vendor/github.com/softlayer/softlayer-go/session/xmlrpc.go
generated
vendored
Normal file
195
vendor/github.com/softlayer/softlayer-go/session/xmlrpc.go
generated
vendored
Normal file
|
@ -0,0 +1,195 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package session
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"strings"
|
||||
|
||||
"github.com/renier/xmlrpc"
|
||||
"github.com/softlayer/softlayer-go/sl"
|
||||
)
|
||||
|
||||
// Debugging RoundTripper
|
||||
type debugRoundTripper struct{}
|
||||
|
||||
func (mrt debugRoundTripper) RoundTrip(request *http.Request) (*http.Response, error) {
|
||||
log := Logger
|
||||
log.Println("->>>Request:")
|
||||
dumpedReq, _ := httputil.DumpRequestOut(request, true)
|
||||
log.Println(string(dumpedReq))
|
||||
|
||||
response, err := http.DefaultTransport.RoundTrip(request)
|
||||
if err != nil {
|
||||
log.Println("Error:", err)
|
||||
return response, err
|
||||
}
|
||||
|
||||
log.Println("\n\n<<<-Response:")
|
||||
dumpedResp, _ := httputil.DumpResponse(response, true)
|
||||
log.Println(string(dumpedResp))
|
||||
|
||||
return response, err
|
||||
}
|
||||
|
||||
// XML-RPC Transport
|
||||
type XmlRpcTransport struct{}
|
||||
|
||||
func (x *XmlRpcTransport) DoRequest(
|
||||
sess *Session,
|
||||
service string,
|
||||
method string,
|
||||
args []interface{},
|
||||
options *sl.Options,
|
||||
pResult interface{},
|
||||
) error {
|
||||
|
||||
serviceUrl := fmt.Sprintf("%s/%s", strings.TrimRight(sess.Endpoint, "/"), service)
|
||||
|
||||
var roundTripper http.RoundTripper
|
||||
if sess.Debug {
|
||||
roundTripper = debugRoundTripper{}
|
||||
}
|
||||
|
||||
timeout := DefaultTimeout
|
||||
if sess.Timeout != 0 {
|
||||
timeout = sess.Timeout
|
||||
}
|
||||
|
||||
client, err := xmlrpc.NewClient(serviceUrl, roundTripper, timeout)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Could not create an xmlrpc client for %s: %s", service, err)
|
||||
}
|
||||
|
||||
authenticate := map[string]interface{}{}
|
||||
if sess.UserName != "" {
|
||||
authenticate["username"] = sess.UserName
|
||||
}
|
||||
|
||||
if sess.APIKey != "" {
|
||||
authenticate["apiKey"] = sess.APIKey
|
||||
}
|
||||
|
||||
if sess.UserId != 0 {
|
||||
authenticate["userId"] = sess.UserId
|
||||
authenticate["complexType"] = "PortalLoginToken"
|
||||
}
|
||||
|
||||
if sess.AuthToken != "" {
|
||||
authenticate["authToken"] = sess.AuthToken
|
||||
authenticate["complexType"] = "PortalLoginToken"
|
||||
}
|
||||
|
||||
headers := map[string]interface{}{}
|
||||
if len(authenticate) > 0 {
|
||||
headers["authenticate"] = authenticate
|
||||
}
|
||||
|
||||
if options.Id != nil {
|
||||
headers[fmt.Sprintf("%sInitParameters", service)] = map[string]int{
|
||||
"id": *options.Id,
|
||||
}
|
||||
}
|
||||
|
||||
mask := options.Mask
|
||||
if mask != "" {
|
||||
if !strings.HasPrefix(mask, "mask[") && !strings.Contains(mask, ";") && strings.Contains(mask, ",") {
|
||||
mask = fmt.Sprintf("mask[%s]", mask)
|
||||
headers["SoftLayer_ObjectMask"] = map[string]string{"mask": mask}
|
||||
} else {
|
||||
headers[fmt.Sprintf("%sObjectMask", service)] =
|
||||
map[string]interface{}{"mask": genXMLMask(mask)}
|
||||
}
|
||||
}
|
||||
|
||||
if options.Filter != "" {
|
||||
// FIXME: This json unmarshaling presents a performance problem,
|
||||
// since the filter builder marshals a data structure to json.
|
||||
// This then undoes that step to pass it to the xmlrpc request.
|
||||
// It would be better to get the umarshaled data structure
|
||||
// from the filter builder, but that will require changes to the
|
||||
// public API in Options.
|
||||
objFilter := map[string]interface{}{}
|
||||
err := json.Unmarshal([]byte(options.Filter), &objFilter)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error encoding object filter: %s", err)
|
||||
}
|
||||
headers[fmt.Sprintf("%sObjectFilter", service)] = objFilter
|
||||
}
|
||||
|
||||
if options.Limit != nil {
|
||||
offset := 0
|
||||
if options.Offset != nil {
|
||||
offset = *options.Offset
|
||||
}
|
||||
|
||||
headers["resultLimit"] = map[string]int{
|
||||
"limit": *options.Limit,
|
||||
"offset": offset,
|
||||
}
|
||||
}
|
||||
|
||||
// Add incoming arguments to xmlrpc parameter array
|
||||
params := []interface{}{}
|
||||
|
||||
if len(headers) > 0 {
|
||||
params = append(params, map[string]interface{}{"headers": headers})
|
||||
}
|
||||
|
||||
for _, arg := range args {
|
||||
params = append(params, arg)
|
||||
}
|
||||
|
||||
err = client.Call(method, params, pResult)
|
||||
if xmlRpcError, ok := err.(*xmlrpc.XmlRpcError); ok {
|
||||
return sl.Error{
|
||||
StatusCode: xmlRpcError.HttpStatusCode,
|
||||
Exception: xmlRpcError.Code.(string),
|
||||
Message: xmlRpcError.Err,
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func genXMLMask(mask string) interface{} {
|
||||
objectMask := map[string]interface{}{}
|
||||
for _, item := range strings.Split(mask, ";") {
|
||||
if !strings.Contains(item, ".") {
|
||||
objectMask[item] = []string{}
|
||||
continue
|
||||
}
|
||||
|
||||
level := objectMask
|
||||
names := strings.Split(item, ".")
|
||||
totalNames := len(names)
|
||||
for i, name := range names {
|
||||
if i == totalNames-1 {
|
||||
level[name] = []string{}
|
||||
continue
|
||||
}
|
||||
|
||||
level[name] = map[string]interface{}{}
|
||||
level = level[name].(map[string]interface{})
|
||||
}
|
||||
}
|
||||
|
||||
return objectMask
|
||||
}
|
49
vendor/github.com/softlayer/softlayer-go/sl/errors.go
generated
vendored
Normal file
49
vendor/github.com/softlayer/softlayer-go/sl/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sl
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Error contains detailed information about an API error, which can be useful
|
||||
// for debugging, or when finer error handling is required than just the mere
|
||||
// presence or absence of an error.
|
||||
//
|
||||
// Error implements the error interface
|
||||
type Error struct {
|
||||
StatusCode int
|
||||
Exception string `json:"code"`
|
||||
Message string `json:"error"`
|
||||
Wrapped error
|
||||
}
|
||||
|
||||
func (r Error) Error() string {
|
||||
if r.Wrapped != nil {
|
||||
return r.Wrapped.Error()
|
||||
}
|
||||
|
||||
var msg string
|
||||
if r.Exception != "" {
|
||||
msg = r.Exception + ": "
|
||||
}
|
||||
if r.Message != "" {
|
||||
msg = msg + r.Message + " "
|
||||
}
|
||||
if r.StatusCode != 0 {
|
||||
msg = fmt.Sprintf("%s(HTTP %d)", msg, r.StatusCode)
|
||||
}
|
||||
return msg
|
||||
}
|
175
vendor/github.com/softlayer/softlayer-go/sl/helpers.go
generated
vendored
Normal file
175
vendor/github.com/softlayer/softlayer-go/sl/helpers.go
generated
vendored
Normal file
|
@ -0,0 +1,175 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Package sl has convenience functions for returning pointers to values
|
||||
package sl
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/softlayer/softlayer-go/datatypes"
|
||||
)
|
||||
|
||||
// Int returns a pointer to the int value provided
|
||||
func Int(v int) *int {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Uint returns a pointer to the uint value provided
|
||||
func Uint(v uint) *uint {
|
||||
return &v
|
||||
}
|
||||
|
||||
// String returns a pointer to the string value provided
|
||||
func String(v string) *string {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Bool returns a pointer to the bool value provided
|
||||
func Bool(v bool) *bool {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Time converts the time.Time value provided to a datatypes.Time value,
|
||||
// and returns a pointer to it
|
||||
func Time(v time.Time) *datatypes.Time {
|
||||
r := datatypes.Time{Time: v}
|
||||
return &r
|
||||
}
|
||||
|
||||
// Float converts the float value provided to a datatypes.Float64 value,
|
||||
// and returns a pointer to it
|
||||
func Float(v float64) *datatypes.Float64 {
|
||||
r := datatypes.Float64(v)
|
||||
return &r
|
||||
}
|
||||
|
||||
// Convenience functions to simplify dereference of datatype properties
|
||||
|
||||
// Get returns the value of p, either p itself, or, if p is a pointer, the
|
||||
// value that p points to. d is an optional default value to be returned
|
||||
// in the event that p is nil. If d is not specified, and p is nil, a
|
||||
// type-appropriate zero-value is returned instead.
|
||||
func Get(p interface{}, d ...interface{}) interface{} {
|
||||
var (
|
||||
val interface{}
|
||||
ok bool
|
||||
)
|
||||
|
||||
if val, ok = GetOk(p); ok {
|
||||
return val
|
||||
}
|
||||
|
||||
if len(d) > 0 {
|
||||
return d[0]
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
// GetOk returns the value of p, either p itself, or, if p is a pointer, the
|
||||
// value that p points to. If p is nil, a type-appropriate zero-value is
|
||||
// returned instead. If p is a value or non-nil pointer, the second return
|
||||
// value will be true. Otherwise, it will be false.
|
||||
func GetOk(p interface{}) (interface{}, bool) {
|
||||
t := reflect.TypeOf(p)
|
||||
|
||||
// if p is a non-pointer, just return it
|
||||
if t.Kind() != reflect.Ptr {
|
||||
return p, true
|
||||
}
|
||||
|
||||
// p is a pointer. If non-nil, return the value pointed to
|
||||
v := reflect.Indirect(reflect.ValueOf(p))
|
||||
if v.IsValid() {
|
||||
return v.Interface(), true
|
||||
}
|
||||
|
||||
// p is a nil pointer. Return the zero value for the pointed-to type
|
||||
return reflect.Zero(t.Elem()).Interface(), false
|
||||
}
|
||||
|
||||
// Grab returns the value specified by the path given,
|
||||
// starting from the struct s.
|
||||
// If at any point in the path the lookup falls short
|
||||
// (i.e. a field is not found), or if the last field in the path is nil
|
||||
// itself, a type-appropriate zero-value is returned.
|
||||
// This behavior can be overidden by providing a default value.
|
||||
//
|
||||
// This is useful for getting values our of deeply nested structures
|
||||
// Example: val := sl.Grab(virtualGuest, "Datacenter.Name")
|
||||
func Grab(s interface{}, path string, d ...interface{}) interface{} {
|
||||
var (
|
||||
val interface{}
|
||||
ok bool
|
||||
)
|
||||
|
||||
if val, ok = GrabOk(s, path); ok {
|
||||
return val
|
||||
}
|
||||
|
||||
if len(d) > 0 {
|
||||
return d[0]
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
// GrabOk returns the value specified by the path given,
|
||||
// starting from the struct s.
|
||||
// If at any point in the path the lookup falls short
|
||||
// (i.e. a field is not found), or if the last field in the path is nil
|
||||
// itself, a type-appropriate zero-value is returned.
|
||||
// It returns a second value, a boolean, which will be false if it failed
|
||||
// to lookup the value, including if the last field in the path was nil.
|
||||
//
|
||||
// This is useful for getting values our of deeply nested structures
|
||||
// Example: val, ok := sl.GrabOk(virtualGuest, "Datacenter.Name")
|
||||
func GrabOk(s interface{}, path string) (interface{}, bool) {
|
||||
t := reflect.TypeOf(s)
|
||||
if t.Kind() != reflect.Struct {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
dotIndex := strings.Index(path, ".")
|
||||
if dotIndex == -1 {
|
||||
dotIndex = len(path)
|
||||
}
|
||||
|
||||
fieldName := path[0:dotIndex]
|
||||
val := reflect.ValueOf(s)
|
||||
fieldVal := val.FieldByName(fieldName)
|
||||
if fieldVal.Kind() == reflect.Ptr {
|
||||
if fieldVal.IsNil() {
|
||||
return reflect.Zero(fieldVal.Type().Elem()).Interface(), false
|
||||
}
|
||||
|
||||
fieldVal = reflect.Indirect(fieldVal)
|
||||
}
|
||||
|
||||
result, ok := GetOk(fieldVal.Interface())
|
||||
if !ok {
|
||||
return result, ok
|
||||
}
|
||||
|
||||
if dotIndex == len(path) {
|
||||
return result, ok
|
||||
}
|
||||
|
||||
return GrabOk(result, path[dotIndex+1:len(path)])
|
||||
}
|
27
vendor/github.com/softlayer/softlayer-go/sl/options.go
generated
vendored
Normal file
27
vendor/github.com/softlayer/softlayer-go/sl/options.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sl
|
||||
|
||||
// Options contains the individual query parameters that can be applied to
|
||||
// a request.
|
||||
type Options struct {
|
||||
Id *int
|
||||
Mask string
|
||||
Filter string
|
||||
Limit *int
|
||||
Offset *int
|
||||
}
|
47
vendor/github.com/softlayer/softlayer-go/sl/version.go
generated
vendored
Normal file
47
vendor/github.com/softlayer/softlayer-go/sl/version.go
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Copyright 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
|
||||
*/
|
||||
|
||||
package sl
|
||||
|
||||
import "fmt"
|
||||
|
||||
type VersionInfo struct {
|
||||
Major int
|
||||
Minor int
|
||||
Patch int
|
||||
Pre string
|
||||
}
|
||||
|
||||
var Version = VersionInfo{
|
||||
Major: 0,
|
||||
Minor: 1,
|
||||
Patch: 0,
|
||||
Pre: "alpha",
|
||||
}
|
||||
|
||||
func (v VersionInfo) String() string {
|
||||
result := fmt.Sprintf("v%d.%d.%d", v.Major, v.Minor, v.Patch)
|
||||
|
||||
if v.Pre != "" {
|
||||
result += fmt.Sprintf("-%s", v.Pre)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
249
vendor/golang.org/x/text/encoding/charmap/charmap.go
generated
vendored
Normal file
249
vendor/golang.org/x/text/encoding/charmap/charmap.go
generated
vendored
Normal file
|
@ -0,0 +1,249 @@
|
|||
// Copyright 2013 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:generate go run maketables.go
|
||||
|
||||
// Package charmap provides simple character encodings such as IBM Code Page 437
|
||||
// and Windows 1252.
|
||||
package charmap // import "golang.org/x/text/encoding/charmap"
|
||||
|
||||
import (
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/text/encoding"
|
||||
"golang.org/x/text/encoding/internal"
|
||||
"golang.org/x/text/encoding/internal/identifier"
|
||||
"golang.org/x/text/transform"
|
||||
)
|
||||
|
||||
// These encodings vary only in the way clients should interpret them. Their
|
||||
// coded character set is identical and a single implementation can be shared.
|
||||
var (
|
||||
// ISO8859_6E is the ISO 8859-6E encoding.
|
||||
ISO8859_6E encoding.Encoding = &iso8859_6E
|
||||
|
||||
// ISO8859_6I is the ISO 8859-6I encoding.
|
||||
ISO8859_6I encoding.Encoding = &iso8859_6I
|
||||
|
||||
// ISO8859_8E is the ISO 8859-8E encoding.
|
||||
ISO8859_8E encoding.Encoding = &iso8859_8E
|
||||
|
||||
// ISO8859_8I is the ISO 8859-8I encoding.
|
||||
ISO8859_8I encoding.Encoding = &iso8859_8I
|
||||
|
||||
iso8859_6E = internal.Encoding{
|
||||
Encoding: ISO8859_6,
|
||||
Name: "ISO-8859-6E",
|
||||
MIB: identifier.ISO88596E,
|
||||
}
|
||||
|
||||
iso8859_6I = internal.Encoding{
|
||||
Encoding: ISO8859_6,
|
||||
Name: "ISO-8859-6I",
|
||||
MIB: identifier.ISO88596I,
|
||||
}
|
||||
|
||||
iso8859_8E = internal.Encoding{
|
||||
Encoding: ISO8859_8,
|
||||
Name: "ISO-8859-8E",
|
||||
MIB: identifier.ISO88598E,
|
||||
}
|
||||
|
||||
iso8859_8I = internal.Encoding{
|
||||
Encoding: ISO8859_8,
|
||||
Name: "ISO-8859-8I",
|
||||
MIB: identifier.ISO88598I,
|
||||
}
|
||||
)
|
||||
|
||||
// All is a list of all defined encodings in this package.
|
||||
var All []encoding.Encoding = listAll
|
||||
|
||||
// TODO: implement these encodings, in order of importance.
|
||||
// ASCII, ISO8859_1: Rather common. Close to Windows 1252.
|
||||
// ISO8859_9: Close to Windows 1254.
|
||||
|
||||
// utf8Enc holds a rune's UTF-8 encoding in data[:len].
|
||||
type utf8Enc struct {
|
||||
len uint8
|
||||
data [3]byte
|
||||
}
|
||||
|
||||
// Charmap is an 8-bit character set encoding.
|
||||
type Charmap struct {
|
||||
// name is the encoding's name.
|
||||
name string
|
||||
// mib is the encoding type of this encoder.
|
||||
mib identifier.MIB
|
||||
// asciiSuperset states whether the encoding is a superset of ASCII.
|
||||
asciiSuperset bool
|
||||
// low is the lower bound of the encoded byte for a non-ASCII rune. If
|
||||
// Charmap.asciiSuperset is true then this will be 0x80, otherwise 0x00.
|
||||
low uint8
|
||||
// replacement is the encoded replacement character.
|
||||
replacement byte
|
||||
// decode is the map from encoded byte to UTF-8.
|
||||
decode [256]utf8Enc
|
||||
// encoding is the map from runes to encoded bytes. Each entry is a
|
||||
// uint32: the high 8 bits are the encoded byte and the low 24 bits are
|
||||
// the rune. The table entries are sorted by ascending rune.
|
||||
encode [256]uint32
|
||||
}
|
||||
|
||||
// NewDecoder implements the encoding.Encoding interface.
|
||||
func (m *Charmap) NewDecoder() *encoding.Decoder {
|
||||
return &encoding.Decoder{Transformer: charmapDecoder{charmap: m}}
|
||||
}
|
||||
|
||||
// NewEncoder implements the encoding.Encoding interface.
|
||||
func (m *Charmap) NewEncoder() *encoding.Encoder {
|
||||
return &encoding.Encoder{Transformer: charmapEncoder{charmap: m}}
|
||||
}
|
||||
|
||||
// String returns the Charmap's name.
|
||||
func (m *Charmap) String() string {
|
||||
return m.name
|
||||
}
|
||||
|
||||
// ID implements an internal interface.
|
||||
func (m *Charmap) ID() (mib identifier.MIB, other string) {
|
||||
return m.mib, ""
|
||||
}
|
||||
|
||||
// charmapDecoder implements transform.Transformer by decoding to UTF-8.
|
||||
type charmapDecoder struct {
|
||||
transform.NopResetter
|
||||
charmap *Charmap
|
||||
}
|
||||
|
||||
func (m charmapDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
for i, c := range src {
|
||||
if m.charmap.asciiSuperset && c < utf8.RuneSelf {
|
||||
if nDst >= len(dst) {
|
||||
err = transform.ErrShortDst
|
||||
break
|
||||
}
|
||||
dst[nDst] = c
|
||||
nDst++
|
||||
nSrc = i + 1
|
||||
continue
|
||||
}
|
||||
|
||||
decode := &m.charmap.decode[c]
|
||||
n := int(decode.len)
|
||||
if nDst+n > len(dst) {
|
||||
err = transform.ErrShortDst
|
||||
break
|
||||
}
|
||||
// It's 15% faster to avoid calling copy for these tiny slices.
|
||||
for j := 0; j < n; j++ {
|
||||
dst[nDst] = decode.data[j]
|
||||
nDst++
|
||||
}
|
||||
nSrc = i + 1
|
||||
}
|
||||
return nDst, nSrc, err
|
||||
}
|
||||
|
||||
// DecodeByte returns the Charmap's rune decoding of the byte b.
|
||||
func (m *Charmap) DecodeByte(b byte) rune {
|
||||
switch x := &m.decode[b]; x.len {
|
||||
case 1:
|
||||
return rune(x.data[0])
|
||||
case 2:
|
||||
return rune(x.data[0]&0x1f)<<6 | rune(x.data[1]&0x3f)
|
||||
default:
|
||||
return rune(x.data[0]&0x0f)<<12 | rune(x.data[1]&0x3f)<<6 | rune(x.data[2]&0x3f)
|
||||
}
|
||||
}
|
||||
|
||||
// charmapEncoder implements transform.Transformer by encoding from UTF-8.
|
||||
type charmapEncoder struct {
|
||||
transform.NopResetter
|
||||
charmap *Charmap
|
||||
}
|
||||
|
||||
func (m charmapEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
|
||||
r, size := rune(0), 0
|
||||
loop:
|
||||
for nSrc < len(src) {
|
||||
if nDst >= len(dst) {
|
||||
err = transform.ErrShortDst
|
||||
break
|
||||
}
|
||||
r = rune(src[nSrc])
|
||||
|
||||
// Decode a 1-byte rune.
|
||||
if r < utf8.RuneSelf {
|
||||
if m.charmap.asciiSuperset {
|
||||
nSrc++
|
||||
dst[nDst] = uint8(r)
|
||||
nDst++
|
||||
continue
|
||||
}
|
||||
size = 1
|
||||
|
||||
} else {
|
||||
// Decode a multi-byte rune.
|
||||
r, size = utf8.DecodeRune(src[nSrc:])
|
||||
if size == 1 {
|
||||
// All valid runes of size 1 (those below utf8.RuneSelf) were
|
||||
// handled above. We have invalid UTF-8 or we haven't seen the
|
||||
// full character yet.
|
||||
if !atEOF && !utf8.FullRune(src[nSrc:]) {
|
||||
err = transform.ErrShortSrc
|
||||
} else {
|
||||
err = internal.RepertoireError(m.charmap.replacement)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Binary search in [low, high) for that rune in the m.charmap.encode table.
|
||||
for low, high := int(m.charmap.low), 0x100; ; {
|
||||
if low >= high {
|
||||
err = internal.RepertoireError(m.charmap.replacement)
|
||||
break loop
|
||||
}
|
||||
mid := (low + high) / 2
|
||||
got := m.charmap.encode[mid]
|
||||
gotRune := rune(got & (1<<24 - 1))
|
||||
if gotRune < r {
|
||||
low = mid + 1
|
||||
} else if gotRune > r {
|
||||
high = mid
|
||||
} else {
|
||||
dst[nDst] = byte(got >> 24)
|
||||
nDst++
|
||||
break
|
||||
}
|
||||
}
|
||||
nSrc += size
|
||||
}
|
||||
return nDst, nSrc, err
|
||||
}
|
||||
|
||||
// EncodeRune returns the Charmap's byte encoding of the rune r. ok is whether
|
||||
// r is in the Charmap's repertoire. If not, b is set to the Charmap's
|
||||
// replacement byte. This is often the ASCII substitute character '\x1a'.
|
||||
func (m *Charmap) EncodeRune(r rune) (b byte, ok bool) {
|
||||
if r < utf8.RuneSelf && m.asciiSuperset {
|
||||
return byte(r), true
|
||||
}
|
||||
for low, high := int(m.low), 0x100; ; {
|
||||
if low >= high {
|
||||
return m.replacement, false
|
||||
}
|
||||
mid := (low + high) / 2
|
||||
got := m.encode[mid]
|
||||
gotRune := rune(got & (1<<24 - 1))
|
||||
if gotRune < r {
|
||||
low = mid + 1
|
||||
} else if gotRune > r {
|
||||
high = mid
|
||||
} else {
|
||||
return byte(got >> 24), true
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue