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|null $api = null ]) : callable
Redundant method signature to preserve backwards compatibility.
Parameters
- $protocol : string
-
Protocol to parse (e.g., query, json, etc.)
- $api : Service|null = null
Tags
Return values
callablecreateParser()
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
callablecreateSerializer()
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
callablegetApiVersion()
Get the API version of the service
public
getApiVersion() : string
Return values
stringgetClientContextParams()
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
callablegetEndpointPrefix()
Get the API version of the service
public
getEndpointPrefix() : string
Return values
stringgetErrorShapes()
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
OperationgetOperations()
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
stringgetProvider()
Get the service's api provider.
public
getProvider() : callable
Return values
callablegetServiceFullName()
Get the full name of the service
public
getServiceFullName() : string
Return values
stringgetServiceId()
Get the service id
public
getServiceId() : string
Return values
stringgetServiceName()
Get the service name.
public
getServiceName() : string
Return values
stringgetShapeMap()
Get the shape map used by the API.
public
getShapeMap() : ShapeMap
Return values
ShapeMapgetSignatureVersion()
Get the default signature version of the service.
public
getSignatureVersion() : string
Note: this method assumes "v4" when not specified in the model.
Return values
stringgetSigningName()
Get the signing name used by the service.
public
getSigningName() : string
Return values
stringgetUid()
Get the uid string used by the service
public
getUid() : string
Return values
stringgetWaiterConfig()
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
boolhasPaginator()
Determines if the service has a paginator by name.
public
hasPaginator(string $name) : bool
Parameters
- $name : string
-
Name of the paginator.
Return values
boolhasWaiter()
Determines if the service has a waiter by name.
public
hasWaiter(string $name) : bool
Parameters
- $name : string
-
Name of the waiter.
Return values
booloffsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed|null
Parameters
- $offset : mixed
Return values
mixed|nulloffsetSet()
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