PawsFunctions: PawsFunctions class

PawsFunctionsR Documentation

PawsFunctions class

Description

Class to convert lists to Paws api calls.

Methods

Public methods


Method to_camel_case()

Convert a snake case string to camel case.

Usage
PawsFunctions$to_camel_case(snake_case)
Arguments
snake_case

(str): String to convert to camel case.

Returns

(str): String converted to camel case.


Method to_snake_case()

Convert a camel case string to snake case.

Usage
PawsFunctions$to_snake_case(name)
Arguments
name

(str): String to convert to snake case.

Returns

(str): String converted to snake case.


Method from_paws()

Convert an UpperCamelCase paws response to a snake case representation.

Usage
PawsFunctions$from_paws(
  paws_list,
  paws_name_to_member_name,
  member_name_to_type
)
Arguments
paws_list

(list[str, ?]): A paws response dictionary.

paws_name_to_member_name

(dict[str, str]): A map from paws name to snake_case name. If a given paws name is not in the map then a default mapping is applied.

member_name_to_type

(list[str, (ApiObject, boolean)]): A map from snake case name to a type description tuple. The first element of the tuple, a subclass of ApiObject, is the type of the mapped object. The second element indicates whether the mapped element is a collection or singleton.

Returns

list: Paws response in snake case.


Method to_paws()

Convert a dict of of snake case names to values into a paws UpperCamelCase representation.

Usage
PawsFunctions$to_paws(
  member_vars,
  member_name_to_paws_name,
  member_name_to_type
)
Arguments
member_vars

(list[str, ?]): A map from snake case name to value.

member_name_to_paws_name

(list[str, ?]): A map from snake_case name to paws name.

member_name_to_type

(list): A map from UpperCamelCase name to a type description tuple. The first element of the tuple, a subclass of ApiObject, is the type of the mapped object. The second element indicates whether the mapped element is a collection or singleton.

Returns

(list): paws dict converted to snake case


Method clone()

The objects of this class are cloneable with this method.

Usage
PawsFunctions$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-local documentation built on June 14, 2022, 10:32 p.m.