SDK for PHP 3.x

Service extends AbstractModel
in package

Represents a web service API model.

Table of Contents

Methods

__construct()  : mixed
createErrorParser()  : callable
Creates an error parser for the given protocol.
createParser()  : callable
Applies the listeners needed to parse client models.
createSerializer()  : callable
Creates a request serializer for the provided API object.
getApiVersion()  : string
Get the API version of the service
getClientContextParams()  : array<string|int, mixed>
Get all the context params of the description.
getDefinition()  : callable
Get the service's definition.
getEndpointPrefix()  : string
Get the API version of the service
getErrorShapes()  : array<string|int, mixed>
Get all of the error shapes of the service
getMetadata()  : mixed
Get all of the service metadata or a specific metadata key value.
getOperation()  : Operation
Get an operation by name.
getOperations()  : array<string|int, Operation>
Get all of the operations of the description.
getPaginatorConfig()  : array<string|int, mixed>
Retrieve a paginator by name.
getPaginators()  : array<string|int, mixed>
Gets an associative array of available paginator configurations where the key is the name of the paginator, and the value is the paginator configuration.
getProtocol()  : string
Get the protocol used by the service.
getProvider()  : callable
Get the service's api provider.
getServiceFullName()  : string
Get the full name of the service
getServiceId()  : string
Get the service id
getServiceName()  : string
Get the service name.
getShapeMap()  : ShapeMap
Get the shape map used by the API.
getSignatureVersion()  : string
Get the default signature version of the service.
getSigningName()  : string
Get the signing name used by the service.
getUid()  : string
Get the uid string used by the service
getWaiterConfig()  : array<string|int, mixed>
Get a waiter configuration by name.
getWaiters()  : array<string|int, mixed>
Gets an associative array of available waiter configurations where the key is the name of the waiter, and the value is the waiter configuration.
hasOperation()  : bool
Check if the description has a specific operation by name.
hasPaginator()  : bool
Determines if the service has a paginator by name.
hasWaiter()  : bool
Determines if the service has a waiter by name.
offsetExists()  : bool
offsetGet()  : mixed|null
offsetSet()  : void
offsetUnset()  : void
toArray()  : mixed

Methods

__construct()

public __construct(array<string|int, mixed> $definition, ShapeMap $shapeMap) : mixed
Parameters
$definition : array<string|int, mixed>

Service description

$shapeMap : ShapeMap

Shapemap used for creating shapes

createErrorParser()

Creates an error parser for the given protocol.

public static createErrorParser(string $protocol[, Service $api = null ]) : callable

Redundant method signature to preserve backwards compatibility.

Parameters
$protocol : string

Protocol to parse (e.g., query, json, etc.)

$api : Service = null
Tags
throws
UnexpectedValueException
Return values
callable

createParser()

Applies the listeners needed to parse client models.

public static createParser(Service $api) : callable
Parameters
$api : Service

API to create a parser for

Tags
throws
UnexpectedValueException
Return values
callable

createSerializer()

Creates a request serializer for the provided API object.

public static createSerializer(Service $api, string $endpoint) : callable
Parameters
$api : Service

API that contains a protocol.

$endpoint : string

Endpoint to send requests to.

Tags
throws
UnexpectedValueException
Return values
callable

getApiVersion()

Get the API version of the service

public getApiVersion() : string
Return values
string

getClientContextParams()

Get all the context params of the description.

public getClientContextParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefinition()

Get the service's definition.

public getDefinition() : callable
Return values
callable

getEndpointPrefix()

Get the API version of the service

public getEndpointPrefix() : string
Return values
string

getErrorShapes()

Get all of the error shapes of the service

public getErrorShapes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMetadata()

Get all of the service metadata or a specific metadata key value.

public getMetadata([string|null $key = null ]) : mixed
Parameters
$key : string|null = null

Key to retrieve or null to retrieve all metadata

Return values
mixed

Returns the result or null if the key is not found

getOperation()

Get an operation by name.

public getOperation(string $name) : Operation
Parameters
$name : string

Operation to retrieve by name

Tags
throws
InvalidArgumentException

If the operation is not found

Return values
Operation

getOperations()

Get all of the operations of the description.

public getOperations() : array<string|int, Operation>
Return values
array<string|int, Operation>

getPaginatorConfig()

Retrieve a paginator by name.

public getPaginatorConfig(string $name) : array<string|int, mixed>
Parameters
$name : string

Paginator to retrieve by name. This argument is typically the operation name.

Tags
throws
UnexpectedValueException

if the paginator does not exist.

unstable

The configuration format of paginators may change in the future

Return values
array<string|int, mixed>

getPaginators()

Gets an associative array of available paginator configurations where the key is the name of the paginator, and the value is the paginator configuration.

public getPaginators() : array<string|int, mixed>
Tags
unstable

The configuration format of paginators may change in the future

Return values
array<string|int, mixed>

getProtocol()

Get the protocol used by the service.

public getProtocol() : string
Return values
string

getProvider()

Get the service's api provider.

public getProvider() : callable
Return values
callable

getServiceFullName()

Get the full name of the service

public getServiceFullName() : string
Return values
string

getServiceId()

Get the service id

public getServiceId() : string
Return values
string

getServiceName()

Get the service name.

public getServiceName() : string
Return values
string

getShapeMap()

Get the shape map used by the API.

public getShapeMap() : ShapeMap
Return values
ShapeMap

getSignatureVersion()

Get the default signature version of the service.

public getSignatureVersion() : string

Note: this method assumes "v4" when not specified in the model.

Return values
string

getSigningName()

Get the signing name used by the service.

public getSigningName() : string
Return values
string

getUid()

Get the uid string used by the service

public getUid() : string
Return values
string

getWaiterConfig()

Get a waiter configuration by name.

public getWaiterConfig(string $name) : array<string|int, mixed>
Parameters
$name : string

Name of the waiter by name.

Tags
throws
UnexpectedValueException

if the waiter does not exist.

Return values
array<string|int, mixed>

getWaiters()

Gets an associative array of available waiter configurations where the key is the name of the waiter, and the value is the waiter configuration.

public getWaiters() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasOperation()

Check if the description has a specific operation by name.

public hasOperation(string $name) : bool
Parameters
$name : string

Operation to check by name

Return values
bool

hasPaginator()

Determines if the service has a paginator by name.

public hasPaginator(string $name) : bool
Parameters
$name : string

Name of the paginator.

Return values
bool

hasWaiter()

Determines if the service has a waiter by name.

public hasWaiter(string $name) : bool
Parameters
$name : string

Name of the waiter.

Return values
bool

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed|null
Parameters
$offset : mixed
Return values
mixed|null

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

toArray()

public toArray() : mixed
On this page