auxiliary.go raw

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