Service
extends AbstractModel
in package
Represents a web service API model.
Table of Contents
- $definition : array<string|int, mixed>
- $shapeMap : ShapeMap
- $apiProvider : callable
- $apiVersion : string
- $operations : array<string|int, Operation>
- $paginators : array<string|int, mixed>
- $serviceName : string
- $waiters : array<string|int, mixed>
- __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
- 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.
- 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() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- toArray() : mixed
- shapeAt() : mixed
- shapeFor() : mixed
Properties
$definition
protected
array<string|int, mixed>
$definition
$shapeMap
protected
ShapeMap
$shapeMap
$apiProvider
private
callable
$apiProvider
$apiVersion
private
string
$apiVersion
$operations
private
array<string|int, Operation>
$operations
= []
$paginators
private
array<string|int, mixed>
$paginators
= null
$serviceName
private
string
$serviceName
$waiters
private
array<string|int, mixed>
$waiters
= null
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
Return values
mixed —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
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
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
Return values
callable —getApiVersion()
Get the API version of the service
public
getApiVersion() : string
Return values
string —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
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
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
Return values
array<string|int, mixed> —getProtocol()
Get the protocol used by the service.
public
getProtocol() : string
Return values
string —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
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) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetSet()
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
Return values
mixed —offsetUnset()
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —toArray()
public
toArray() : mixed
Return values
mixed —shapeAt()
protected
shapeAt(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —shapeFor()
protected
shapeFor(array<string|int, mixed> $definition) : mixed
Parameters
- $definition : array<string|int, mixed>