code: def from_api_repr(cls, resource):
          
          array_type = resource["parameterType"]["arrayType"]["type"]
          if array_type == "STRUCT":
              return cls._from_api_repr_struct(resource)
          return cls._from_api_repr_scalar(resource)
docs: Factory: construct parameter from JSON resource.
  
          :type resource: dict
          :param resource: JSON mapping of parameter
  
          :rtype: :class:`~google.cloud.bigquery.query.ArrayQueryParameter`
          :returns: instance