1/** 2 * Copyright 2016 IBM Corp. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17/** 18 * AUTOMATICALLY GENERATED CODE - DO NOT MODIFY 19 */ 20 21package services 22 23import ( 24 "fmt" 25 "strings" 26 27 "github.com/softlayer/softlayer-go/datatypes" 28 "github.com/softlayer/softlayer-go/session" 29 "github.com/softlayer/softlayer-go/sl" 30) 31 32// no documentation yet 33type Compliance_Report_Type struct { 34 Session *session.Session 35 Options sl.Options 36} 37 38// GetComplianceReportTypeService returns an instance of the Compliance_Report_Type SoftLayer service 39func GetComplianceReportTypeService(sess *session.Session) Compliance_Report_Type { 40 return Compliance_Report_Type{Session: sess} 41} 42 43func (r Compliance_Report_Type) Id(id int) Compliance_Report_Type { 44 r.Options.Id = &id 45 return r 46} 47 48func (r Compliance_Report_Type) Mask(mask string) Compliance_Report_Type { 49 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) { 50 mask = fmt.Sprintf("mask[%s]", mask) 51 } 52 53 r.Options.Mask = mask 54 return r 55} 56 57func (r Compliance_Report_Type) Filter(filter string) Compliance_Report_Type { 58 r.Options.Filter = filter 59 return r 60} 61 62func (r Compliance_Report_Type) Limit(limit int) Compliance_Report_Type { 63 r.Options.Limit = &limit 64 return r 65} 66 67func (r Compliance_Report_Type) Offset(offset int) Compliance_Report_Type { 68 r.Options.Offset = &offset 69 return r 70} 71 72// no documentation yet 73func (r Compliance_Report_Type) GetAllObjects() (resp []datatypes.Compliance_Report_Type, err error) { 74 err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getAllObjects", nil, &r.Options, &resp) 75 return 76} 77 78// no documentation yet 79func (r Compliance_Report_Type) GetObject() (resp datatypes.Compliance_Report_Type, err error) { 80 err = r.Session.DoRequest("SoftLayer_Compliance_Report_Type", "getObject", nil, &r.Options, &resp) 81 return 82} 83